My data is like this
g1    g2   g3    value1    value2
A     X    True    1         2
A     X    False   3         4
B     Y    True    5         6
It was grouped by (g1, g2, g3) and then reset_index. What I am trying to do is to ungroup/unpivot the column g3 so that the output looks something like this?
g1    g2   value1_True    value2_True   value1_False    value2_False
A     X       1                2            3               4
B     Y       5                6            0               0
I have tried to search online but could not find any answer for my particular case. Appreciate any help.
 
    