标签: python pandas list dictionary collections
将熊猫数据框设为
index A B 1 5 6 2 8 10
将其转换为字典,例如
{'1':[5, 6], '2':[8, 10]}
在python中可以转换吗?如果是,请以有效的方式提供代码。