I have Comp(PL,Bundesliga etc) column and gls column and player column
standard.groupby(['Comp'])['Gls'].max()
By using this I can max goals in each league
Comp
de Bundesliga 41
eng Premier League 23
es La Liga 30
fr Ligue 1 27
it Serie A 29
But how can I display the player's name who has scored this goal?
I have used this ,
f = {'Gls': 'max','Player': 'first'}
standard.groupby(['Comp'], as_index=False).agg(f)
It still wont give the desired result, as it just displays first names from each league
Comp Gls Player
0 de Bundesliga 41 Issah Abbas\Issah-Abbas
1 eng Premier League 23 Patrick van Aanholt\Patrick-van-Aanholt
2 es La Liga 30 Sabit Abdulai\Sabit-Abdulai
3 fr Ligue 1 27 Ismael Aaneba\Ismael-Aaneba
4 it Serie A 29 Gennaro Acampora\Gennaro-Acampora