MediumAbout 12 minJoins & merges
Find orders with no matching customer
Given an orders DataFrame (order_id, customer_id) and a customers DataFrame (customer_id, …), return the order_ids of orphan orders — those whose customer_id has no matching customer.
Return a sorted Python list of order_ids.
What the tests check
2 on Run · 3 on Submit01returns orders with no matching customer
02none orphaned returns empty list
Submit runs these and one more check you don’t see, so code written for the visible tests alone can still miss.
Runtime
Python 3.13 in your browser – the standard library plus pandas and numpy; no pip installs.