FunctionRacerProblemsRace

Biggest Daily Jump

BeginnerpandasPython

prices has columns day and price (whole numbers), with at least two rows. Return the largest value of "this row's price minus the previous row's price" as an int. It can be negative if the price only falls.

Example 1

prices {"day":[1,2,3],"price":[10,15,12]}
returns 5

Changes are +5 and -3; the biggest is 5.

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