【发布时间】:2019-01-28 21:05:41
【问题描述】:
我有两个要附加在一起的数据框。以下是样本。
df_1:
Code Title
103 general checks
107 limits
421 horseshoe
319 scheduled
501 zonal
df_2
Code Title
103 hello
108 lucky eight
421 little toe
319 scheduled cat
503 new item
仅当 df_2 中的代码号在 df_1 中不存在时,我才想将 df_2 附加到 df_1。
下面是我想要的数据框:
Code Title
103 general checks
107 limits
421 horseshoe
319 scheduled
501 zonal
108 lucky eight
503 new item
我已经通过 Google 和 Stackoverflow 进行了搜索,但在这个特定案例中找不到任何内容。
【问题讨论】:
标签: python pandas append conditional