I have this dataframe:
ALPHA DELTA BETA GAMMA
0 # 1 NaN NaN
1 # NaN 2 5
2 # NaN NaN 3
3 # 8 4 5
The objective is to add the name of one or more columns already present by duplicating the rows that have several values on the same row in this dataframe.
The objective is to obtain this dataframe:
NEW ALPHA DELTA BETA GAMMA
DELTA # 1 NaN NaN
BETA # NaN 2 5
GAMMA # NaN 2 5
GAMMA # NaN NaN 3
DELTA # 8 4 5
BETA # 8 4 5
GAMMA # 8 4 5
I don't know where to start. Can you help please ? Thanks !