0
Pandas input
I have task in Pandas FrameWork. I have to operate with columns of FW. How can I do that if I see no column titles and what is what?.. the task about Covid where I have to determine the day with highest infected/dead ratio
1 Antwort
0
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']
y=df["ratio"].idxmax()
x=df.loc[[y]]
print(x)