MediumAbout 11 minDataFrame selection
Keep rows whose group meets a threshold
Given an orders DataFrame with order_id and customer_id, return all orders belonging to customers who have at least n orders total — a row filter driven by a group-level condition.
Return a sorted list of the surviving order_ids.
What the tests check
3 on Run · 4 on Submit01keeps orders only for customers with >= n orders
02threshold not met -> empty
03a customer with exactly n orders is kept
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.