When I search for my problem all I keep finding is grouping the same values together but I am looking to get the value of each team and add them together
Eg this is my Dataframe
0 Liverpool 4
1 West Ham 0
2 Bournemouth 1
3 Burnley 3
4 Crystal Palace 0
5 Liverpool 6
6 West Ham 2
7 Bournemouth 8
8 Burnley 1
9 Crystal Palace 4
All the examples I see online is just grouping them together
eg
0 Liverpool 4
1 Liverpool 5
2 West Ham 2
3 West Ham 1
4 Crystal Palace 4
5 Crystal Palace 1
but what I am after is in order of high to low
0 Liverpool 9
1 Crystal Palace 5
2 West Ham 3

df.groupby('club')['goals'].sum()dfthat liverloop has 6 and 4, so sum to 10; Crystal Palace has 4 and 0, sum to 4, and West Ham has 2 and 0, sums to 0. all different than your desired output..sort_values(ascending=False)match_data1.dtypes? From your updated output, it looks like your 'FTHG' isn't numerical, but strings and so won't sum.