pandas fill missing values with average code example
Example: how to fill missing values dataframe with mean
sub2['income'].fillna((sub2['income'].mean()), inplace=True)
sub2['income'].fillna((sub2['income'].mean()), inplace=True)