I obtained a dataframe using pd.pivot_table, that looks like this:
foo bar
Cond1 60 65 60 65
Cond2
50 200 210 16.7 15.2
100 200 210 14.9 13.5
I need to get an output that looks like this by merging the foo and bar columns:
foo(bar)
Cond1 60 65
Cond2
50 200(16.7) 210(15.2)
100 200(14.9) 210(13.5)
Is this possible in python using only pandas or numpy or internal libraries?