You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try with this to handle non numeric columns separately to keep non numeric columns perform aggregation differently.
gender_group=df.groupby('gender').agg({
'math_score': 'mean', #replace by column names'reading_score': 'mean',
'writing_score': 'mean'# change to 'count', or other suitable aggregations
})
print(gender_group)
I have gone through this error as the gender is not a number we are unable to find out the mean we can solve this by converting it into the number
The text was updated successfully, but these errors were encountered: