In this section, we will see how to sort data in Series and DataFrame objects.
How to sort data in Series and DataFrame objects
Getting ready
One of the most basic and common operations to perform during a data analysis is to select rows containing the largest value of some column within a group. For instance, this would be like finding the highest rated film or the highest grossing film of each year by content rating. To accomplish this task, we need to sort the groups as well as the column used to rank each member of the group, and then extract the highest member of each group.