Covid data problem, python for data science. Issue. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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?

1st Apr 2021, 11:38 AM
Martin L.
Martin L. - avatar
2 Answers
+ 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()])
25th Jun 2021, 7:21 PM
dead falcon
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
8th Apr 2021, 9:40 PM
Martin L.
Martin L. - avatar