Names in City
people has columns name and city. Return a list of the names of people whose city is exactly city, in the order they appear.
Example 1
people {"name":["Ana","Ben","Cy"],"city":["Rome","Oslo","Rome"]}
city "Rome"
returns ["Ana","Cy"]
Ana and Cy live in Rome.
Constraints
- The tables are small
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- Pick Two ColumnsBeginner
- Rename ColumnsBeginner
- Running Sales TotalBeginner
- Sorted Unique ValuesBeginner
- Swap the LabelsBeginner
- Table ShapeBeginner
- Top ScoresBeginner
- Upper QuartileBeginner