SyntaxFix
Write A Post
Hire A Developer
Questions
Try:
sub2['income'].fillna((sub2['income'].mean()), inplace=True)