I have seen how to work with a double index, but I have not seen how to work with a two-row column headers. Is this possible?
For example, row 1 is a repetitive series of dates: 2016, 2016, 2015, 2015
Row 2 is a repetitive series of data. Dollar Sales, Unit Sales, Dollar Sales, Unit Sales.
So each "Dollar Sales" heading is actually tied to the date in the row above.
Subsequent rows are individual items with data.
Is there a way to do a groupby
or some way that I can have two column headers? Ultimately, I want to line up the "Dollar Sales" as a series by date so that I can make a nice graph. Unfortunately there are multiple columns before the next "Dollar Sales" value. (More than just the one "Unit Sales" column). Also if I delete the date row above, there is no link between which "Dollar Sales" are tied to each date.