I have a list of sales reps and each rep has multiple sales listed for the year. I am trying to identify just the top sales rep and the bottom sales rep.
With the following line of code I am able to sum sales by rep, but I also need a print line that identifies who the top and bottom sales reps were.
Sample Data
Region -- Rep -- Total
East -- Tony -- 189.05
East -- Tony -- 999.50
Central -- Billy -- 179.64
Central -- Billy -- 539.73
West -- Sammy -- 167.44
East -- Suzy -- 299.40
Central -- Billy -- 149.25
Central -- Billy -- 449.10
West -- Sally -- 63.68
print(pd.pivot_table(df,index = ["Rep"], values = ["Total"],aggfunc=np.sum))