Skip to content
Advertisement

How to add a new column rank on based on increasing value of other column in Pandas

I have this dataframe with which i am trying to create a new column rank on basis of increasing values of column Opportunity with pandas

JavaScript

required output —

JavaScript

Advertisement

Answer

You can use rank function:

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement