Python, Pandas, Data Science, Machine Learning, Pandas Dataframe.
by the author. Given that the age feature ranges from 0 to 99, we can convert its data type to int8. #int df["Age"].memory_usage(index=False, deep=False) #8000000 #convert df["Age"] = df["Age"].astype('int8') df["Age"].memory_usage(index=False, deep=False) #1000000 #float df["Salary_After_Tax"] =