dgrtwo / fuzzyjoin

Join tables together on inexact matching
Other
664 stars 62 forks source link

Fuzzy match conditional on exact match #47

Closed nurfatimaj closed 5 years ago

nurfatimaj commented 5 years ago

Hello!

As presented in an example, the function stringdist_left_join can return multiple matches from y dataset for one line of x dataset. In my case, I have a situation where the result of the match includes label.x label.y Merton Merton Merton Melton Is it possible to tell the function that if it finds an exact match, it should retain it and move on to the next line?

Thank you!

dgrtwo commented 5 years ago

There isn't an easy way to support this in fuzzyjoin. Instead, I'd recommend doing an exact join first, and then anti_joining out those cases before you do your stringdist_left_join (and then adding them back in after).