-1
我有以下DataFrame。描述城市裏,每一個用戶生活按數據分組到數據框列與熊貓
City Name Date
0 Seattle Alice 2017
1 Seattle Bob 2011
2 Portland Mallory 2010
3 Seattle Mallory 2016
4 Memphis Bob 2012
5 Portland Mallory 2013
您大熊貓可以實現以下?
Name City1 Date1 City2 Date2 City3 Date3
0 Alice Seattle 2017 NaN NaN NaN NaN
1 Bob Seattle 2011 Memphis 2012 NaN NaN
2 Mallory Portland 2010 Seattle 2016 Portland 2013
非常感謝!