df1 = pd.pivot_table(df, rows=['A', 'B'], cols='C', aggfunc=np.sum)
df1
index = list(iter.product(df['A'].unique(), df['B'].unique()))
Pandas Handling Missing Values when going from Data Frame to Pivot Table