-
-
Save amankharwal/3da5aa7233c118ad317c2b3cddbffec3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = [] | |
for i in range(1,len(df0)): | |
count.append(sum(pd.to_numeric(df0.iloc[i,1:].values))) | |
df = pd.DataFrame() | |
df["Date"] = df0["Country/Region"][1:] | |
df["Cases"] = count | |
df=df.set_index("Date") | |
count = [] | |
for i in range(1,len(df1)): | |
count.append(sum(pd.to_numeric(df1.iloc[i,1:].values))) | |
df["Deaths"] = count | |
df.Cases.plot(title="Daily Covid19 Cases in World",marker=".",figsize=(10,5),label="daily cases") | |
df.Cases.rolling(window=5).mean().plot(figsize=(10,5),label="MA5") | |
plt.ylabel("Cases") | |
plt.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment