Orders carry only a customer_id. To report by customer tier you need the customer master joined in — and orders from unknown customers must not be silently dropped.
Write a function enrich(orders, customers) that left-joins customers onto orders on customer_id, and fills a missing tier with "Unknown".
More Pandas — Joins questions
Practising alone only goes so far — our live cohorts pair Python and Pandas depth with dashboards, agentic analytics projects and mock interviews.
Explore the program