COVID Data Analysis project in data science with python
hi every body. i am so new in python, i had written this code for this question: You are working with the COVID dataset for California, which includes the number of cases and deaths for each day of 2020. Find the day when the deaths/cases ratio was largest. To do this, you need to first calculate the deaths/cases ratio and add it as a column to the DataFrame with the name 'ratio', then find the row that corresponds to the largest value. i do not understand what is problem exactly. can anyone help me? thanks a lot. import pandas as pd df = pd.read_csv("/usercode/files/ca-covid.csv") df.drop('state', axis=1, inplace=True) df.set_index('date', inplace=True) df['ratio']=df['deaths']/df['cases'] a=df['ratio'].idxmax print(df.loc[[a]])