I have a dataframe like this:
innings batsman batsman_runs
1 AA Noffke 9
1 B Akhil 0
1 BB McCullum 158
1 CL White 6
1 DJ Hussey 12....
I need to sort the batsman_runs in descending order and also show their corresponding batsman i.e if 158 is at the top, then BB McCullum should be in the adjacent cell. I tried the following code:
df['batsman_runs'].sort_values(ascending=False)
But this code does not show the batsman name. How do i show the runs with the corresponding batsman ?