0

I need to find argmax index in pd.DataFrame. I want exacly the same result, as pandas.DataFrame.idxmax does, but this function returns index of first occurrence of maximum over requested axis. I want find index of last occurrence of maximum. Thank you in advance.

1 Answers1

1

Run df[::-1].idxmax()

The trick is to process rows in reversed order.

Valdi_Bo
  • 27,886
  • 3
  • 21
  • 36