擅长:python、mysql、java
<p>您可以对两列使用<code>apply</code>,并过滤结果:</p>
<pre><code>filtered = df[(df[['lat','lng']].apply(lambda x: haversine(*x,*geocode), axis=1))<=0.1]
print (filtered)
</code></pre>
<p>结果:</p>
<pre><code> title created_at lng lat
0 a 2019-01-16 21:21:11 127.048667 37.504856
</code></pre>