I have a data "last_3_days" like this:
Then I groupby ['user_id','sku_id','type'] and count the number of each 'type' of each ['user_id','sku_id'] pair.
How can I assign the groupby results to each ['user_id','sku_id'] pair? For each ['user_id','sku_id'] pair, they should have these additional columns:['type1_count','type2_count',...,'type6_count'].
Each column means the count of that 'type'. There are 6 types in the 'type' column.
Update: @gereleth's answer is what I want. But the result is like this:

How to change the above to this?
