Reputation: 199
I have a pandas DataFrame that looks like this:
I would like to use the pd.DataFrame.rank(axis=1, ascending=False)
feature to rank the dataframe subject to the condition that the value is greater than zero. That is, only values greater than zero should be ranked. All other values less than or equal to zero should be zero.
Can anyone offer some advice?
Thank you!
Upvotes: 2
Views: 1777