FunctionRacerProblemsRace

Upper Quartile

BeginnerpandasPython

df has a numeric column x. Return its 75th percentile as a float, using the usual pandas rule (quantile(0.75)): sort the values, go to position 0.75 * (n - 1) counting from 0, and if that falls between two values, blend them in proportion.

Example 1

df {"x":[1,2,3,4,5]}
returns 4.0

Position 3 is the value 4.

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