intent: pandas pivot table of sales
rewritten_intent: pivot dataframe `df` so that values for `upc` become column headings and values for `saleid` become the index
snippet: df.pivot_table(index='saleid', columns='upc', aggfunc='size', fill_value=0)