NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#Deaths
import pandas as pd
import csv
import itertools
import numpy as np
data2 = pd.read_csv('time_series_covid19_deaths_global.csv')
df3 = data2.groupby("Country/Region")[data2.columns].sum()
#Drop Column after 31 March 2020
df_3=df3.drop(df3.columns[72:],axis=1)
df4 = df_3.sort_values(by=[df_3.columns[71]],ascending=False)
df5=df4.drop(['Lat','Long'], axis=1)
df8=df5.T
def keep_cols(Data, keep_these):
"""Keep only the columns [keep_these] in a DataFrame, delete
all other columns.
"""
drop_these = list(set(list(Data)) - set(keep_these))
return Data.drop(drop_these, axis = 1)

new_data = df8.pipe(keep_cols, ['Pakistan', 'Poland','Philippines','Thailand','Ecuador','Luxembourg'])
new_data.plot(figsize=(20,10))
plt.legend(fontsize=15)
plt.title("Deaths in Top 5 Countries with Similar Spread as Pakistan", loc='center', fontsize=20, fontweight=0, color='Orange')
plt.xlabel("Time Series",fontsize=25)
plt.ylabel("Deaths",fontsize=25)



#Recovered
import pandas as pd
import csv
import itertools
import numpy as np
data2 = pd.read_csv('time_series_covid19_recovered_global.csv')
df3 = data2.groupby("Country/Region")[data2.columns].sum()
#Drop Column after 31 March 2020
df_3=df3.drop(df3.columns[72:],axis=1)
df4 = df_3.sort_values(by=[df_3.columns[71]],ascending=False)
df5=df4.drop(['Lat','Long'], axis=1)
df9=df5.T
def keep_cols(Data, keep_these):
"""Keep only the columns [keep_these] in a DataFrame, delete
all other columns.
"""
drop_these = list(set(list(Data)) - set(keep_these))
return Data.drop(drop_these, axis = 1)

new_data = df9.pipe(keep_cols, ['Pakistan', 'Poland','Philippines','Thailand','Ecuador','Luxembourg'])
new_data.plot(figsize=(20,10))
plt.legend(fontsize=15)
plt.title("Recovered cases in Top 5 Countries with Similar Spread as Pakistan", loc='center', fontsize=20, fontweight=0, color='Orange')
plt.xlabel("Time Series",fontsize=25)
plt.ylabel("Recovered Cases",fontsize=25)





#Confirmed
import pandas as pd
import csv
import itertools
import numpy as np
data2 = pd.read_csv('time_series_covid19_confirmed_global.csv')
df3 = data2.groupby("Country/Region")[data2.columns].sum()
#Drop Column after 31 March 2020
df_3=df3.drop(df3.columns[72:],axis=1)
df4 = df_3.sort_values(by=[df_3.columns[71]],ascending=False)
df5=df4.drop(['Lat','Long'], axis=1)
df7=df5.T
def keep_cols(Data, keep_these):
"""Keep only the columns [keep_these] in a DataFrame, delete
all other columns.
"""
drop_these = list(set(list(Data)) - set(keep_these))
return Data.drop(drop_these, axis = 1)

new_data = df7.pipe(keep_cols, ['Pakistan', 'Poland','Philippines','Thailand','Ecuador','Luxembourg'])
new_data.plot(figsize=(20,10))
plt.legend(fontsize=15)
plt.title("Confirmed cases in Top 5 Countries with Similar Spread as Pakistan", loc='center', fontsize=20, fontweight=0, color='Orange')
plt.xlabel("Time Series",fontsize=25)
plt.ylabel("Confirmed Cases",fontsize=25)
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.