CodeNewbie Community 🌱

Matt Eves
Matt Eves

Posted on

Help - how to ID max value/col name in pandas data frame?

Hi all. First post, apologies in advance for errors in tags/location etc. Working on a python project involving pandas data frames and a bit stuck. Can anyone tell me how to:

  1. identify the max value in a given row and the column name that max value is in?
  2. Identify the second to max value in a given row and the column name that second highest value is in? If it helps, the values are all floats between 0 and 1 - thanks!

Top comments (0)