← All Python interview questions

Join orders with the customer master

MediumPandas — JoinsAmazonNykaa

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".

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