LAB 3
LAB 3
Load dataset
Print dataset
Find shape of dataset
Print information related given data
Data Cleaning
o Print name of columns
Find Null values and replace with relative values if each column contains
samples greater than 200000
o Find null values containing columns with isna()
o Apply isna().sum().
o Apply isna().sum.sum()
o Replace all null values with mean or median in numerical based
columns (if each column contains samples greater than 200000)
o Drop those columns which contain null as well as categorical values in
data set
☺ HAPPY LEARNING ☺
Final shape of Dataset must be (401236, 33) and show following detail when
call info()
☺ HAPPY LEARNING ☺
21 median_age 401236 non-null float64
22 aged_65_older 401236 non-null float64
23 aged_70_older 401236 non-null float64
24 gdp_per_capita 401236 non-null float64
25 extreme_poverty 401236 non-null float64
26 cardiovasc_death_rate 401236 non-null float64
27 diabetes_prevalence 401236 non-null float64
28 handwashing_facilities 401236 non-null float64
29 hospital_beds_per_thousand 401236 non-null float64
30 life_expectancy 401236 non-null float64
31 human_development_index 401236 non-null float64
32 population 401236 non-null int64
Now filter and print data on the bases of above continent like, Africa, Europe,
Asia, North America, Oceania, and South America separately.
☺ HAPPY LEARNING ☺