I have a dataset in which there are two index columns. The first one is a MultiIndex and the second is a normal index, but with lots of duplicate entries. I'd like to join those indexes into a second level MultiIndex.
i have something like this:
column1|column2|column3|column4|column5|column6|column7
---------------------------------------------------------------------
MultiIndex1| a | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| a | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| a | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| b | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| b | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| b | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
I'd like my output to look like this:
column1|column2|column3|column4|column5|column6|column7
---------------------------------------------------------------------
MultiIndex1| a | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
|_____________| 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| b | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
| | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00
Any help would be immensely appreciated. thank you!
Sorry, don't have enough reputation to post images.