You can use the pandas dataframe sort_values() function to sort a dataframe. It allows the flexibility to sort a dataframe by one or more columns.