如何加入类似于左联接但保留右列的pandas df

时间:2019-07-10 08:29:36

标签: pandas

以下是两个示例dfs:

$plate = "AAA 1234";
$plateNum = str_replace(' ', '', $plate);

$plateNum = explode(' ', $plateNum);

$updatedPlateNum = '';
foreach ($plateNum as $string) {
    $updatedPlateNum .= $string;
}

并且加入的df应该是

id    text1                     id   text2
1     banana                    1    house
2     apple                     3    river                    
4     grape

这既不是左,也不是右,也不是内部联接,对吗? 我该怎么做?

0 个答案:

没有答案