pandas, melt, unmelt preserve index

后端 未结 3 789
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 09:10

I\'ve got a table of clients (coper) and asset allocation (asset)

A = [[1,2],[3,4],[5,6]]
idx = [\'coper1\',\'coper2\',\'coper3\']
cols = [\'asset1\',\'asset         


        
3条回答
  •  暖寄归人
    2020-12-09 09:47

    Looks like "optional argument keep_index to dataframe melt method" got into release 1.1: https://github.com/pandas-dev/pandas/issues/17440

提交回复
热议问题