6

I have two DataFrames that each have a column for firstname. I'd like to merge the columns on those strings, but on the Levenshtein distance as opposed to just where the strings are equal.

I'm basically trying to replicate the following SQL if I could do Levenshtein distance in SQL:

SELECT 
    *
FROM dataset_a a
    JOIN dataset_b b on Levenshtein(a.firstname,b.firstname) <= 3

Is it possible to merge DataFrames based on functions like this?

Travis
  • 533
  • 1
  • 7
  • 16
  • 4
    Possible duplicate of [this post](http://stackoverflow.com/questions/13636848/is-it-possible-to-do-fuzzy-match-merge-with-python-pandas). – Andy Kubiak Aug 27 '15 at 13:10

0 Answers0