pandas sort rows from a to b code example Example: python dataframe sort by column name >>> result = df.sort(['A', 'B'], ascending=[1, 0])