之间我有2个非索引数据帧,具有完全相同的数据结构(同一列),为简单起见在这里是一个例子:大熊猫:数据差(△)2个数据帧
DF1
0 1 2 3 4
JoeK Joe Kavanagh 120 [email protected]
BarryD Barry Dempsy 11 [email protected]
OrlaF Orla Farrel 236 [email protected]
SethB Seth Black 563 [email protected]
KateW Kate White 254 [email protected]
,第二个:
DF2
0 1 2 3 4
JoeK Joe Kavanagh 110 [email protected]
BarryD Barry Dempsy 11 [email protected]
JimmyS Jimmy Smith 250 [email protected]
SethB Seth Blake 563 [email protected]
我想有一个RESU lting表示DF1不在DF2行dataframes:
0 1 2 3 4
JoeK Joe Kavanagh 120 [email protected]
OrlaF Orla Farrel 236 [email protected]
SethB Seth Black 563 [email protected]
KateW Kate White 254 [email protected]
注意,第一行(Joek,和SethB)在两个dataframes存在,但第3列的用于JoeK值和列的值2的SethB已经改变了,这就是他们进入最终结果集的原因。
任何帮助,非常感谢。
你的结果不应该只是'df1',因为电子邮件不符合第二行吗?或者你的限制只是在第0-3列上匹配? – EdChum
那么斑点,那是一个错字。我现在纠正了它。 –