Jovian
⭐️
Sign In
Learn data science and machine learning by building real-world projects on Jovian
In [1]:
from urllib.request import urlretrieve
In [2]:
italy_covid_url = 'https://gist.githubusercontent.com/aakashns/f6a004fa20c84fec53262f9a8bfee775/raw/f309558b1cf5103424cef58e2ecb8704dcd4d74c/italy-covid-daywise.csv'

urlretrieve(italy_covid_url, 'italy-covid-daywise.csv')
Out[2]:
('italy-covid-daywise.csv', <http.client.HTTPMessage at 0x23c3ef06850>)
In [3]:
!pip install pandas
Requirement already satisfied: pandas in c:\users\chaimf\anaconda3\lib\site-packages (1.2.4) Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\chaimf\anaconda3\lib\site-packages (from pandas) (2.8.1) Requirement already satisfied: pytz>=2017.3 in c:\users\chaimf\anaconda3\lib\site-packages (from pandas) (2021.1) Requirement already satisfied: numpy>=1.16.5 in c:\users\chaimf\anaconda3\lib\site-packages (from pandas) (1.20.1) Requirement already satisfied: six>=1.5 in c:\users\chaimf\anaconda3\lib\site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
In [4]:
import pandas as pd
In [5]:
covid_df = pd.read_csv('italy-covid-daywise.csv')
In [6]:
covid_df
Out[6]:
In [7]:
type(covid_df)
Out[7]:
pandas.core.frame.DataFrame
In [8]:
covid_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 248 entries, 0 to 247 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 date 248 non-null object 1 new_cases 248 non-null float64 2 new_deaths 248 non-null float64 3 new_tests 135 non-null float64 dtypes: float64(3), object(1) memory usage: 7.9+ KB
In [9]:
covid_df.describe()
Out[9]:
In [11]:
covid_df.columns
Out[11]:
Index(['date', 'new_cases', 'new_deaths', 'new_tests'], dtype='object')
In [13]:
covid_df.shape
Out[13]:
(248, 4)
In [14]:
import jovian
In [ ]:
jovian.commit(project='Lesson 2 loop and if')
[jovian] Attempting to save notebook..
In [ ]: