>_
nth_highest_salary.py
pandas 3.0
Not run yet

+ 6 hidden

Input
employee
id  salary
1   400
2   700
3   550
4   700
5   300

params
n
2
Expected
[{"nth_highest_salary": 550}]

The distinct salaries from the top are 700, 550, 400 and 300. The two employees on 700 share first place, so the second highest is 550.