see attached

1 answer below »
Answered 5 days AfterOct 31, 2022

Answer To: see attached

Komalavalli answered on Nov 06 2022
48 Votes
Python coding
Problem 1:
import numpy as np # linear algebra
import pandas as pd # data processing
df = pd.r
ead_csv('../input/world-population-dataset/world_population.csv') #loading data sets
df.head(10)
df.columns #colum details
df_cp=df[['Country/Territory','2020 Population','1970 Population']] df_cp
Problem 2:
#mean
mean2020 = df['2020 Population'].mean()
print("The mean of 2020 population is",mean2020)
#median
median2020 = df['2020 Population'].median()
print("The median of 2020 population is",median2020)
#standard deviation
sd2020 = df['2020 Population'].std()
print("The standard deviation of 2020 population is",sd2020)
#minimum
min2020 = df['2020 Population'].min()
print("The minimum of 2020 population is",min2020)
#maximum
max2020 = df['2020 Population'].max()
print("The maximum of 2020 population is",max2020)
Problem 3:
avg_1970_2010 = df.groupby(by= 'Country/Territory')['1970 Population','2010 Population'].mean()print(avg_1970_2010)
Problem 4:
#Problem 4
df.drop(['Rank','Country/Territory','Capital','Continent','2015 Population','2020 Population', '2022 Population','Area...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here