How would I take a df like this:
Dates Type 1 2 3 ...
2018-01-01 Type1 Golf Van Jeep
2018-01-02 Type1 Golf Van Jeep
2018-01-01 Type2 Golf1 Van1 Jeep1
2018-01-02 Type2 Golf2 Van2 Jeep2
and turn it into:
Type1 Type2
Dates 1 2 3 1 2 3 ...
2018-01-01 Golf Van Jeep Golf1 Van1 Jeep1
2018-01-02 Golf Van Jeep Golf2 Van2 Jeep2
EDIT: I would like to introduce a second index like this:
Type Type1 Type2
Numbers 1 2 3 1 2 3
Dates ...
2018-01-01 Golf Van Jeep Golf1 Van1 Jeep1
2018-01-02 Golf Van Jeep Golf2 Van2 Jeep2
EDIT: Now if I wanted to relabel all the Number index values - how would I create this:
Type Type1 Type2
Numbers p1 p2 p3 p1 p2 p3
Dates ...
2018-01-01 Golf Van Jeep Golf1 Van1 Jeep1
2018-01-02 Golf Van Jeep Golf2 Van2 Jeep2
EDIT:
Can just use:
.add_prefix('hh')