A temp agency exports last week's shifts as a CSV file. Each line is one worker:
1name,hours,pay2Ana,12,186.03Ben,3,54.0
pay is what they earned in pounds for all their hours. The agency wants to see who earned the most per hour, but only among workers who did enough hours for it to be fair.
Task: write top_rates(path, min_hours, k). The starter code includes write_text(path, text), which saves CSV text to a file and returns its path. Each test passes that path straight to top_rates.
path with pandas.min_hours hours.k highest rates as a list of [name, rate] pairs, highest rate first, with each rate rounded to 2 decimal places.If fewer than k workers are left, return all of them. If nobody is left, return []. hours is always more than 0, and no two workers have the same rate.