how does pandas calculate mean nan values python 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)