FunctionRacerProblemsRace

Find Customer Referee

EasypandasPython

customers has columns name and referee_id. referee_id is the id of the customer who referred them, or None if nobody did. Return a list of the names of customers whose referee is not the customer with id 2. Customers with no referee are included.

Example 1

customers {"name":["Ana","Ben","Cy"],"referee_id":[null,2,1]}
returns ["Ana","Cy"]

Ben was referred by 2, so he is left out.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More pandas problems