0

How to implement a custom sort function that should consider two columns?

def sort(column: Series) -> Series:
  # What should I do here?    

df.sort_values(["a", "b"], ascending=[True, False], inplace=True, key=sort)
Rodrigo
  • 135
  • 4
  • 45
  • 107
  • This is not more explicit than your previous question, please explain how you have an issue with respect to the duplicates – mozway Oct 24 '22 at 13:25

0 Answers0