Premium problem105. One Current Row per Employee

Easy Locked

employee_salary can hold several rows per employee, one per revision: employee_id, first_name, last_name, salary, department_id. Treat the row with the greatest salary as the current one.

Return one row per employee, keeping all the original columns, sorted by employee_id with the index renumbered from 0.

Input

   employee_id first_name last_name  salary  department_id
0            1        Ada         L   90000              1
1            1        Ada         L  105000              1
2            2         Bo         M   60000              2
3            3         Cy         N   70000              3
4            3         Cy         N   72000              3
5            3         Cy         N   71000              3

Output

   employee_id first_name last_name  salary  department_id
0            1        Ada         L  105000              1
1            2         Bo         M   60000              2
2            3         Cy         N   72000              3

Premium problem

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

Implement solve(...)