@ -1599,8 +1599,8 @@
}
],
"source": [
"infected.loc['US'][2 :].plot()\n",
"recovered.loc['US'][2 :].plot()\n",
"infected.loc['US'][3 :].plot()\n",
"recovered.loc['US'][3 :].plot()\n",
"plt.show()"
]
},
@ -1608,7 +1608,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note** how we use `[2 :]` to remove first two elements of a sequence that contain geolocation of a country. We can also drop those two columns altogether:"
"> **Note** how we use `[3 :]` to remove first two elements of a sequence that contain geolocation of a country. We can also drop those two columns altogether:"
]
},
{
@ -1617,9 +1617,9 @@
"metadata": {},
"outputs": [],
"source": [
"infected.drop(columns=['Lat','Long'],inplace=True)\n",
"recovered.drop(columns=['Lat','Long'],inplace=True)\n",
"deaths.drop(columns=['Lat','Long'],inplace=True)"
"infected.drop(columns=['Lat','Long','Province/State' ],inplace=True)\n",
"recovered.drop(columns=['Lat','Long','Province/State' ],inplace=True)\n",
"deaths.drop(columns=['Lat','Long','Province/State' ],inplace=True)"
]
},
{
@ -1758,7 +1758,7 @@
],
"source": [
"def mkframe(country):\n",
" df = pd.DataFrame({ 'infected' : infected.loc[country] ,\n",
" df = pd.DataFrame({ 'infected' : infected.loc[country],\n",
" 'recovered' : recovered.loc[country],\n",
" 'deaths' : deaths.loc[country]})\n",
" df.index = pd.to_datetime(df.index)\n",