














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















Dataframe contents without sorting Name Age Score 1 Sachin 26 87 2 Dhoni 27 89 3 Virat 25 67 4 Rohit 24 55 5 Shikhar 31 47
Dataframe contents after sorting Name Age Score
3 Rohit 24 2 Virat 25 1 Dhoni 27 0 Sachin 26
4 Shikhar 31 47 55 67 87 89
df=df.sort_values(by=['Age', 'Score'],ascending=[True,False])
Dataframe contents without sorting Name Age Score 1 Sachin 26 87 2 Dhoni 25 67 3 Virat 25 89 4 Rohit 24 55 5 Shikhar 31 47
Dataframe contents after sorting Name Age Score 3 Rohit 24 55 2 Virat 25 89 1 Dhoni 25 67 0 Sachin 26 87 4 Shikhar 31 47