Sort pandas dataframe float column with custom key I want to sort the following DataFrame on the b-column first and then the a-column.