sort by column pandas ascending by one column descending by another code example Example: sort by two columns in pandas df.sort_values(['a', 'b'], ascending=[True, False])