human
pandas: how to run a pivot with a multi-index?
assistant
Here is some code to convert dataframe `df` to a pivot table using column 'year', 'month', and 'item' as indexes

df.set_index(['year', 'month', 'item']).unstack(level=-1)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.