"pandas crosstab, but with values from aggregation of third column","df.pivot_table(index='A', columns='B', values='C', fill_value=0)"