Premium problem96. Job Titles on the Top Salary

Easy Locked

workers has columns worker_id and salary. titles has columns worker_id and worker_title.

Return the job titles held by the worker or workers earning the highest salary, as a Series of strings sorted alphabetically with the index renumbered from 0. Several workers can share the top salary, and one worker can hold more than one title.

Input

workers =
   worker_id  salary
0          1     100
1          2     250
2          3     250
titles =
   worker_id worker_title
0          1        Clerk
1          2         Lead
2          3         Chef
3          3      Manager

Output

0       Chef
1       Lead
2    Manager
Name: worker_title, dtype: object

Premium problem

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

Implement solve(...)