我有两个带有纬度和经度的Pandas数据帧(A
&;B
)。你知道吗
我需要比较它们,如果来自DF A
的纬度和经度出现在DF B
中,那么就添加一个1
else 0
。你知道吗
DF A
LatLong
-37.3794288,175.6697856
-37.0334148,174.8680204
-41.173852,174.981931
DF B
KBATMLongLat
-37.0334148,174.8680204
-37.5575605,175.1584622
-37.0334148,174.8680204
如何实现预期的输出(见下文)?你知道吗
Long lat | Result
--------------------------------
-37.3794288,175.6697856 | False
-37.0334148,174.8680204 | True
-41.173852,174.981931 | False
这是一种方法:
或者,更泛化:
我不确定这有多有效,但你可以使用多索引
相关问题 更多 >
编程相关推荐