我有一个熊猫数据框,如下所示:
Trade_ID Fruit Date Activity Name Number Price
1 Apples 10/6/2016 Buyer Mary 10 5
1 Apples 10/6/2016 Seller Susan 10 5
2 Oranges 11/6/2016 Buyer Mike 9 4
2 Oranges 11/6/2016 Seller Bob 9 4
我想实现下一个输出:
Trade_ID Fruit Date Number Price Name_Buyer Name_Seller
1 Apples 10/6/2016 10 5 Mary Susan
2 Oranges 11/6/2016 9 4 Mike Bob
预先感谢您的帮助