Session Ready
Exercise

Subsetting rows with .query()

In this exercise, you will revisit GDP and population data for Australia and Sweden from the World Bank and expand on it using the .query() method. You'll merge the two tables and compute the GDP per capita. Afterwards, you'll use the .query() method to sub-select the rows and create a plot. Recall that you will need to merge on multiple columns in the proper order.

The tables gdp and pop have been loaded for you.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Use merge_ordered() on gdp and pop on columns country and date with the fill feature, save to gdp_pop and print.