我有一个多索引表,我想做一个groupby来将列汇总到一个新列中。 该表的示例是:
City State Clubs
New York NY Giants, Jets
New York NY Jets, Knicks
New York NY NYFC
Houston TX Astros, Rockets
Houston TX Rockets
San Antonio TX Spurs
San Antonio TX Scorpions
我要获取的表是:
City State Clubs
New York NY Giants, Jets, Knicks
Houston TX Astros, Rockets
San Antonio TX Scorpions, Spurs
我该怎么办?