Question
The file world-cities-populations.csv is a comma-separated file that lists cities, populations and country for a large number of cities around the world. Write a program
The file world-cities-populations.csv is a comma-separated file that lists cities, populations and country for a large number of cities around the world. Write a program that takes as input this file. Load the entries into a dictionary where the key is the city name as it appears in the file, and the value is a tuple containing the population and country. Submit your source code as well as a session record of your program running and returning populations for any three cities.
Modify the program above to add a check to verify that the population field is a number. You do this by trying to convert the number to an integer, and surrounding that code with a try-except block. Submit your code.
Write a program that loads the world-cities-populations.csv file into a pandas data frame. Print a list of the cities in North America to the console.
link to csv file:
https://docs.google.com/spreadsheets/d/1Ver-kUPlLd6CH1_rli_10Ohxjm_LjE0D5IsRDNIbWuU/edit?usp=sharing
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