0

I do have the below code to sort the values descending based on three columns and is working fine.

hr.sort_values(["SEX","DESIGNATION","SALARY"], ascending = False)

OUTPUT

enter image description here

As you can see all the values are in descending or in decreasing

So my requirement is i'm looking for a code where the columns SEX and DESIGNATION has to be in descending and only SALARY column in ascending

Regards

Bharath Vikas

Vikas
  • 199
  • 1
  • 7

1 Answers1

0

You can pass

hr = hr.sort_values(["SEX","DESIGNATION","SALARY"], ascending = [False, False, True])
BENY
  • 317,841
  • 20
  • 164
  • 234