【发布时间】:2016-09-29 08:03:04
【问题描述】:
我列出了 2 个数据框,如下所示
df
Type Breed Common Color Other Color Behaviour
Golden Big Gold White Fun
Corgi Small Brown White Crazy
Bulldog Medium Black Grey Strong
df2
Type Breed Behaviour Bark Sound
Pug Small Sleepy Ak
German Shepard Big Cool Woof
Puddle Small Aggressive Ek
我想按 Type、Breed 和 Behavior 列合并 2 个数据框。
因此,我希望的输出是:
Type Breed Behavior
Golden Big Fun
Corgi Small Crazy
Bulldog Medium Strong
Pug Small Sleepy
German Shepard Big Cool
Puddle Small Aggressive
【问题讨论】:
标签: python pandas dataframe intersection concat