Premium problem116. Five Highest Salaries, Ties Included

Easy Locked

employees has columns employee_id, first_name and salary.

Return the five highest-paid employees, plus anybody tied with the fifth, so the result can be longer than five rows. Sort by salary descending then employee_id, and renumber the index from 0.

nlargest cuts at exactly five by default; it takes a keep argument that changes what happens at the boundary.

Input

   employee_id first_name  salary
0            1          A     100
1            2          B      90
2            3          C      80
3            4          D      70
4            5          E      60
5            6          F      60
6            7          G      50

Output

   employee_id first_name  salary
0            1          A     100
1            2          B      90
2            3          C      80
3            4          D      70
4            5          E      60
5            6          F      60

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)