sort data frame by specific order code example Example: sort function in pandas dataframe to sort specific properties >>> result = df.sort(['A', 'B'], ascending=[1, 0])