我在数据框中有这些列:
a b c d x
0 1 0 0 kevin
1 0 0 0 john
0 0 1 0 mary
1 0 0 0 jessica
0 0 0 1 joe
我需要将前四列变成只有一列。像这样的东西:
new_col x
b kevin
a john
c mary
a jessica
d joe
有熊猫功能吗?