如何在数据框熊猫中将行值更改为列?

时间:2020-06-04 08:31:46

标签: python python-3.x pandas dataframe

我有一个像这样的数据框: totalbalancetemp:number = (+this.balance) + (+this.pastAmount); enter image description here

,我想获取此数据框: df1 = pd.DataFrame({'users': ['user1','user1','user2','user2'], 'date': ['day1','day2','day1','day2'],'MBcount':[32,23,43,23],'target':['nan','up','nan','down']})

enter image description here

0 个答案:

没有答案