将高转换为宽数据框熊猫

时间:2021-03-18 09:56:50

标签: pandas

我有:

pd.DataFrame({'col1':['a','a','a','b','b','b','b','b'],'col2':[123,456,789,12,34,56,78,90]})

enter image description here

我想要:

enter image description here

这个转换叫什么?任何建议如何在熊猫中做到这一点?

0 个答案:

没有答案