FunctionRacerProblemsRace

Above the Middle Everywhere

MediumpandasPython

scores has columns student, subject and score, one row per student per subject they take. Return the names, alphabetically, of the students whose score is above the median score of the subject in every subject they take.

Example 1

scores {"student":["ann","bob","cy","ann","bob","cy"],"subject":["math","math","math","art","art","art"],"score":[90,70,50,85,80,60]}
returns ["ann"]

The medians are 70 in math and 80 in art. ann is above both. bob sits exactly on both medians, which is not above, and cy is below both.

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