0
How can I output a row of DataFram in python , numpy array?
Hello, In the following code, 'Covid' dataset has two columns named cases and deaths. I must create a new column named ratio which is deaths/cases. Then I must represent the row related to date which its ratio element was maximum. I have the problem with the last section. I can not do that. Can anyone help me? Thank you. https://code.sololearn.com/c3G5qnn6JX84/?ref=app
1 Antwort
+ 1
df['ratio'].max() returns the maximum. Now you can index the row by selecting the row where the ratio equals the maximum