df1:
df2:
然后我想选出df2中的4这一条,于是
我select a.* from df1a ,df2 b where a.id_ <> b.id
最终并没有得到我要的结果
而是这个
为什么?因为我们把sql改一下,把b也一起打印
select a.* ,b.from df1a ,df2 b where a.id_ <> b.id
这样就知道是怎么回事了,我们换一下sql
select a.,b.* from df1 a left join on df2 bon a.id_ = b.id_
这样把null的过滤出来就ok了