sort column subset of in pandas code example Example: python dataframe sort by column name >>> result = df.sort(['A', 'B'], ascending=[1, 0])