FunctionRacerProblemsRace

Peak Sales Day

EasypandasPython

sales has columns day (text) and amount. Return the day with the largest amount. If several days tie, return the one that appears first.

Example 1

sales {"day":["Mon","Tue","Wed"],"amount":[5,9,9]}
returns "Tue"

Tue and Wed tie at 9, Tue comes first.

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