# 9.5:  Single-column aggregation (.groupby() and .pivot_table().  Show sum of 'SaleAmount' grouped
# by 'SalesRep'.

import pandas as pd

df = pd.read_excel("../sales-funnel.xlsx")

dfgb = df.groupby('SalesRep').SaleAmount.sum()

dfgb


dfpt = pd.pivot_table(df, index='SalesRep',
                          values='SaleAmount',
                          aggfunc='sum')

dfpt

