Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need to do this in Python, heres the link to the csv file: https://sourceforge.net/projects/zips/files/#files Only need 1c heres the states capitals: https://cocalc.com/dcf6b567-f89a-4789-8d59-8cfdb7b112e0/raw/assignments/2018-02-16/state_capitals.xlsx import numpy as

image text in transcribedneed to do this in Python, heres the link to the csv file: https://sourceforge.net/projects/zips/files/#files Only need 1c heres the states capitals:

https://cocalc.com/dcf6b567-f89a-4789-8d59-8cfdb7b112e0/raw/assignments/2018-02-16/state_capitals.xlsx 
import numpy as np import pandas as pd Problem 1: Distances between cities Grading criteria: correctness of code. 1a. Retrieve the CSV version of the Zip Code Database, upload it into your project, and import it into a DataFrame. | #pd. read-csv ( ' zips. csv. zip' ) #df-1 = (pd . read csv("zips.csv.zip.)) 1b. Import the Excel file "state_capitals.xlsx" (sourced from Wikipedia, found in this directory) into a DataFrame. #df.to-excel ('state. Capitals .xlsx'' sheet-name-'Sheet 1.) #pd. read-excel ( ' state-capitals. xlsx' ) | #pd . read-excel ('state-capitals .xlsx', index-col=None, na-values-['NA,1) #df-2 -pd . DataFrame (pd.read-excel( 'state-capitals.xlsx', index-col-None , | #df-2 na-values-NA'])) 1c. Construct a new DataFrame in which each row consists of: the name of a state; the two-letter postal abbrevation of the state; the name of the capital city; . a list of the zip codes associated to that city; the latitude and longitude associated to the first zip code in the list. import numpy as np import pandas as pd Problem 1: Distances between cities Grading criteria: correctness of code. 1a. Retrieve the CSV version of the Zip Code Database, upload it into your project, and import it into a DataFrame. | #pd. read-csv ( ' zips. csv. zip' ) #df-1 = (pd . read csv("zips.csv.zip.)) 1b. Import the Excel file "state_capitals.xlsx" (sourced from Wikipedia, found in this directory) into a DataFrame. #df.to-excel ('state. Capitals .xlsx'' sheet-name-'Sheet 1.) #pd. read-excel ( ' state-capitals. xlsx' ) | #pd . read-excel ('state-capitals .xlsx', index-col=None, na-values-['NA,1) #df-2 -pd . DataFrame (pd.read-excel( 'state-capitals.xlsx', index-col-None , | #df-2 na-values-NA'])) 1c. Construct a new DataFrame in which each row consists of: the name of a state; the two-letter postal abbrevation of the state; the name of the capital city; . a list of the zip codes associated to that city; the latitude and longitude associated to the first zip code in the list

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 Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions