Performing Sorting

Sorting by one column

The sort_values() method lets us sort data in a DataFrame by one or more columns. For example, we can use this method to sort the following dataset by the WEIGHT column, as shown below:

Get hands-on with 1400+ tech skills courses.