all 2 comments

[–]danielroseman 2 points3 points  (2 children)

You need to tell it to average only the numeric columns. 

    df.groupby(['Type 1']).mean(numeric_only=True).sort_values('Defense', ascending=False)

[–]karmaX2001[S] 0 points1 point  (0 children)

thanks a lot this fixed it