EasyAbout 7 minDataFrame selection
Filter rows by a set of values
Given an orders DataFrame with order_id and country, and a set of priority countries, return the order_ids whose country is in that set. Return a sorted Python list.
What the tests check
2 on Run · 3 on Submit01keeps rows whose country is in the set
02empty set keeps nothing
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.