Answered step by step
Verified Expert Solution
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
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