I have the following dataframe:
d={'col1':{('a','aaa'):1,
('a','bbb'):2,
('b','bbb'):1,
('b','ccc'):2} }
df=pd.DataFrame(d)
I want to change the dataframe, so that it will have all 'aaa', 'bbb', 'ccc' 2nd level indices for both 'a' and 'b' 1st level indices.