嗨,我有两个数据帧如下所示,并试图得到结果的数据帧如下所示。你知道吗
只想与ID列比较数据帧。你知道吗
id name item price
1 abc pen 10
2 bcd pencil 10
3 cde book 100
4 def stick 50
5 abc pencil 10
id name item price
2 xyz pen 10
50 ahjl phone 1000
1 fff mouse 200
5 ank stamp 20
49 anve cable 2000
结果表
id name item price flag
2 xyz pen 10 yes
5 ank stamp 20 yes
1 fff mouse 200 yes
50 ahjl phone 1000 no
49 anve cable 2000 no
我可以用python实现这一点。 你能帮我和Pypark一起做这个吗。你知道吗
谢谢你
安库什·雷迪
假设您的数据帧分别称为
df1
、df2
:详情:
yes
为df1
预填充flag
列df2
连接,将flag
列中的null
替换为no
相关问题 更多 >
编程相关推荐