python sort on multiple columns code example
Example 1: sort by two columns in pandas
df.sort_values(['a', 'b'], ascending=[True, False])
Example 2: order by multiple columns
ORDER BY column1 DESC, column2
df.sort_values(['a', 'b'], ascending=[True, False])
ORDER BY column1 DESC, column2