Question
SUBJECT : ANALYTICAL PROGRAMMING In this assignment, we're going to analyze an operate on data from a CSV file. Let's begin by downloading the CSV
SUBJECT : ANALYTICAL PROGRAMMING
In this assignment, we're going to analyze an operate on data from a CSV file. Let's begin by downloading the CSV file.
from urllib.request import urlretrieve
urlretrieve('https://gist.githubusercontent.com/aakashns/28b2e504b3350afd9bdb157893f9725c/raw/994b65665757f4f8887db1c85986a897abb23d84/countries.csv', 'countries.csv')
do this on binder.jovian
Q1: How many countries does the dataframe contain?
Hint: Use the .shape method.
Q2: Retrieve a list of continents from the dataframe?
Hint: Use the .unique method of a series.
Q3: What is the total population of all the countries listed in this dataset?
Q4: Create a dataframe containing 10 countries with the highest population.
Hint: Chain the sort_values and head methods.
Q5: Add a new column in countries_df to record the overall GDP per country (product of population & per capita GDP).
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