fillna() with mean code example Example: fillna with mean pandas sub2['income'].fillna((sub2['income'].mean()), inplace=True)