Find Customer Referee
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
- Missing referees are
None
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- First Login DateEasy
- Fix Name CapitalsEasy
- Grade LettersEasy
- Ids in Only One TableEasy
- InitialsEasy
- Invalid TweetsEasy
- Latest Row per PlayerEasy
- Longest TitleEasy