+ 1
Python Pandas challenge
Here's the code, below https://code.sololearn.com/cS1ebdVf3xuy/#py. I can't understand why the second print option doesn't work. Can anyone explain. Thank you
2 Answers
+ 1
df['ratio'].max() returns the max value, not the index of the max value.
In the 1st code example, you get the max value and then search in which row this max value is. Then you access this row in the dataframe.
0
Thank you, Lisa. I tried various solutions, to practice on mistakes. I always have in mind that there is more simple solution :D