Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python, In this part, you should write a for loop, updating the df_users dataframe. Go through each user, and update their zip-code (column name

In python, In this part, you should write a for loop, updating the df_users dataframe. Go through each user, and update their zip-code (column name zip), to Safe Harbour specifications:

  • If the user is from a zip code for the which the "Geographic Subdivision" is less than equal to 20000, change the zip code to 0
  • Otherwise, change the zip code to be only the first 3 numbers of the full zip cide
  • Do all this re-writting the zip_code columns of the df_users DataFrame

Hints: This will be several lines of code, looping through the DataFrame, getting each zip code, checking the geographic subdivision with the population in zip_dict, and settig the zip_code accordingly.

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

denigration of emotional outbursts; being reserved;

Answered: 1 week ago