I have a wide dataframe, with several columns of that describe the type of each row using booleans.
df = pd.DataFrame({'ID': [0, 1, 2, 3], 'Name': ['x', 'y', 'z', 'e'],
                   'Type One': [True, False, False, False], 
                   'Type Two': [False, True, True, True]})
which looks like:
   ID Name  Type One  Type Two
0   0    x      True     False
1   1    y     False      True
2   2    z     False      True
3   3    e     False      True
I would prefer that this dataframe be in a long format, such that each row is matched to a Type:
   ID Name  Type  
0   0    x     Type One
1   1    y     Type Two
2   2    z     Type Two
3   3    e     Type Two
Note: I believe that all ID's have only 1 type, (so where Type One is True, Type N must be False).
 
     
     
    