Challenge 1: Basic Merge [Countries & Bands] (Trivial)
This challenge expects you to merge two DataFrames containing country information and band information.
We'll cover the following
Problem definition
Your music analyst now has two datasets with complementary information.
The first dataset contains information about bands, and their associated data. However, instead of names, it refers to countries by their IDs. Here are the first three rows:
artist | country | plays | genre | fans |
---|---|---|---|---|
The Beatles | 1 | 150 | rock | 50 |
Pink Floyd | 1 | 10000 | rock | 1500 |
Metallica | 2 | 500 | metal | 50 |
The second is a simple mapping between the ID of a country and its name.
country_id | name |
---|---|
1 | UK |
2 | US |
3 | Egypt |
4 | Finland |
Can you help your music analyst find the sum of plays per country name?
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.