I want to create a dataframe that takes the 1st index and makes it into a column.
My grouping code:
candy_df.groupby(['BAG', 'LOLLIPOP']).agg('count')['STICKID']
Right now my grouping returns this:
BAG      LOLLIPOP
011111     CHOCO          69
           VANILL         33
011112     CHOCO         133
           VANILL        129
I'd like to take the 1st index, LOLLIPOP, and make the different flavors be the columns:
BAG        CHOCO         VANILL
011111     69             33
011112     133            129
