I have data frame with columns employee_id, boss_id and level. Employee_id is the id of the employee, boss_id the the id of the employee's boss and level is employee's level. Levels has ('IC', 'MM', 'D') as values.IC reports to MM and MM reports to D.
How to write a loop to get the count of reports for all the employees? For example if an MM bob has 5 ICs then MM bob has 5 reports and IC has 0 reports. If MM bob(has 5 ICs) and MM may(has 3 ICs) report to D jack then D jack has 10 reports.
Aucun commentaire:
Enregistrer un commentaire