0
Covid data problem, python for data science. Issue.
Course: python for data science Module: Data manipulation with Pandas On the Covid data problem, the CSV file is apparently not accessible. As far as I can see, Pandas cannot load it with the given path on line 3. df = pd.read_csv("/usercode/files/ca-covid.csv") Therefore, it does not seem possible to 'solve' this problem without the source dataset. Would it be possible for someone to go have a look and confirm please?
2 odpowiedzi
+ 2
here try this.
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']
print(df[df['ratio'] == df['ratio'].max()])
0
Just to be clear here, I am saying that there is something wrong with the problem and it cannot be solved.
So what I am hoping to get out of this message.. is someone to say : "please report the bug there" or "no.. this can be solved.. you missed xyz".
Thanks