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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!