# Simplest pivot table must have a dataframe # and an index/list of index. table = pd.pivot_table(df, index =['A', 'B']) table