FunctionRacerProblemsRace

Pick Two Columns

BeginnerpandasPython

people has columns name, team, salary and age. Return a DataFrame with only the columns name and salary (in that order), rows in their original order.

Example 1

people {"name":["Ana","Ben"],"team":["x","y"],"salary":[10,20],"age":[30,40]}
returns {"columns":["name","salary"],"rows":[["Ana",10],["Ben",20]]}

Keep name and salary only.

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