Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve using python TASK2 [1 mark] The population_estimates table contains Annual Estimates of the Pesident Population by Singlo Year of Age and Gender for the

Solve using python image text in transcribed
image text in transcribed
TASK2 [1 mark] The population_estimates table contains "Annual Estimates of the Pesident Population by Singlo Year of Age and Gender for the Unted States.". The GENDEA column contains numeric codes: 0 stands for the total, 1 for male, and 2 for female. The AGE column contains ages in completed years, but tho special value 999 is a sum of the total population. The "age" 100 too has a special status. In that category, tha Census Bureau includes all people aged 100 or more. other columns contain estimates of the US population in each category of GENDER and age in the years 2010 through 2019. The Census is decenniali it takes placo overy 10 yoars. The most recent Census was held in 2020 and the one betore that in 2010 . The Consus Bureau also estimates population changes each yoar, As axplained in the Buread's description of its methodology, it "adds estimated changos to the last decennial census to produce updatod population estimates overy year." Typicaly, a publicly avalable table will contain more information than nocestary for a particular investigation or analysis. To get the large table into a more usable form, we have to do some data cloaring. - load the table (population estimates.csi) - print the shape of the tabie 1. we are only interested in the population changes from 2014 to 2019 . Let's select the rolevant columns. so, select only columns 'POPESTMEATE2014', 'POPESTIMATE2019', 'GENDER', AGE' 1.17 froun google.colab inport filea uploaded = filea . upload( ) Koduletotfounderror 1 from google, colab import files 2 uploaded =f iles.upload () Modulelotrounderrora No module naned "google" 2. simplify the labels of the solocted columns (rename) as the following: POPESTMATE2014': 2014', POPESTIMATE2010': '2019' reading: hoy to rename columnt (enndas. DA) 2. simplify the labels of the selected columns (rename) as the folowing: 'POPESTIMATE2014':2014'; POPESTIMATE2019'; '2019' reading: how to rename columns (pandas DF 3. print 5 samples (rows) 4. examine the total population, laboled by GENDER code 0 . Since all these rows will have the same value 0 in the GENDER column, drop that column Reading: drea columne Randas 5. find the population in the highest ages (>-97 and TASK2 [1 mark] The population_estimates table contains "Annual Estimates of the Pesident Population by Singlo Year of Age and Gender for the Unted States.". The GENDEA column contains numeric codes: 0 stands for the total, 1 for male, and 2 for female. The AGE column contains ages in completed years, but tho special value 999 is a sum of the total population. The "age" 100 too has a special status. In that category, tha Census Bureau includes all people aged 100 or more. other columns contain estimates of the US population in each category of GENDER and age in the years 2010 through 2019. The Census is decenniali it takes placo overy 10 yoars. The most recent Census was held in 2020 and the one betore that in 2010 . The Consus Bureau also estimates population changes each yoar, As axplained in the Buread's description of its methodology, it "adds estimated changos to the last decennial census to produce updatod population estimates overy year." Typicaly, a publicly avalable table will contain more information than nocestary for a particular investigation or analysis. To get the large table into a more usable form, we have to do some data cloaring. - load the table (population estimates.csi) - print the shape of the tabie 1. we are only interested in the population changes from 2014 to 2019 . Let's select the rolevant columns. so, select only columns 'POPESTMEATE2014', 'POPESTIMATE2019', 'GENDER', AGE' 1.17 froun google.colab inport filea uploaded = filea . upload( ) Koduletotfounderror 1 from google, colab import files 2 uploaded =f iles.upload () Modulelotrounderrora No module naned "google" 2. simplify the labels of the solocted columns (rename) as the following: POPESTMATE2014': 2014', POPESTIMATE2010': '2019' reading: hoy to rename columnt (enndas. DA) 2. simplify the labels of the selected columns (rename) as the folowing: 'POPESTIMATE2014':2014'; POPESTIMATE2019'; '2019' reading: how to rename columns (pandas DF 3. print 5 samples (rows) 4. examine the total population, laboled by GENDER code 0 . Since all these rows will have the same value 0 in the GENDER column, drop that column Reading: drea columne Randas 5. find the population in the highest ages (>-97 and

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions