Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python question 3. why is it wrong I am so confused # Don't change this cell; just run it. pop = Table.read_table('nst-est2016-alldata.csV').where('SUMLEV', 40).select([1, 4, 12,
python question 3. why is it wrong I am so confused
\# Don't change this cell; just run it. pop = Table.read_table('nst-est2016-alldata.csV').where('SUMLEV', 40).select([1, 4, 12, 13, 27, 34, 62, 69]) pop = pop.relabeled('POPESTIMATE2015', '2015').relabeled('POPESTIMATE2016', '2016') pop = pop.relabeled('BIRTHS2016', 'BIRTHS').relabeled('DEATHS2016', 'DEATHS') pop = pop.relabeled('NETMIG2016', 'MIGRATION').relabeled('RESIDUAL2016', 'OTHER') pop = pop.with_columns("REGION", np.array([int(region) if region ! = "X" else 0 for region in pop.column("REGION") ])) pop.set_format([2,3, 4, 5, 6, 7], NumberFormatter(decimals=0)).show(5) Assign west_births to the total number of births that occurred in region 4 (the Western US)Question 3. Assign to the total number of births that occurred in region 4 (the Western US). (4 Points) Hint: Make sure you double check the type of the values in the REGION column and appropriately filter (i.e. the types must match!). [143]: West_births = sum(pop.where('REGION', are.equal_to('4')).column("BIRTHS")) west_births [143]: 0 [134]: grader.check("q2_3") [134] : 92_3 results: 92_3 - 1 result: Trying: 5e5 1e6 Expecting: True Line 1 , in q2_3 0 Failed example: 5e5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started