I have a pandas Dataframe and i want to group some of the columns to build higher levels columns:
Exemple : i have
Index A B C D
1 0.25 0.3 0.25 0.66
2 0.25 0.3 0.25 0.66
3 0.25 0.3 0.25 0.66
and i want
Index AB || CD
Subindex A | B || C | D
1 0.25 | 0.3 || 0.25 | 0.66
2 0.25 | 0.3 || 0.25 | 0.66
3 0.25 | 0.3 || 0.25 | 0.66
Thank you for your help...