Practice / joins

Everyone's Plan

easy

Waveform wants a roster of every user next to their subscription plan — including the free-tier users who haven't picked a paid plan yet.

You have two DataFrames:

users

plans

Your task: return every user's handle and their plan_name. A user with no plan must still appear, with a null plan_name.

Assign your answer DataFrame to result. Row order doesn't matter.

usersinput DataFrame

Schema
columntype
user_idlong
handlestring
plan_idlong
Sample rows
user_idhandleplan_id
1ada10
2ben20
3caranull

plansinput DataFrame

Schema
columntype
plan_idlong
plan_namestring
Sample rows
plan_idplan_name
10Pro
20Free
Expected output shape
handleplan_name· 3 rows
Hint

users.join(plans, on="plan_id", how="left") keeps every user; those with no plan get a null plan_name. Then select("handle", "plan_name").

Lesson refresher

This problem builds on Joins (~8 min). Pop it open in a new tab if you want a quick recap.

Loading editor…
Hit Run to execute your code and see the output here.