Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Joining Two tables with only 'Name' as a common field

$
0
0

There are two tables with details about Customer Campaign and Customer Sales. In order to obtain insights about the business, these tables need to be joined on a regular basis.

However, Campaign table has First Name and Last Name fields and the Sales table has Full Name Field.These are the only common data between these two tables.

There are issues with the Sales table Name field such as prefixes 'Dr., MR, Master ' etc as well as spelling mismatches between both the first names and last names between the two tables.These are like 'Cathy' against 'Caty' and so on..

I need to join these tables on a one-to-one relationship? Kindly help me with a solution. The solution needs to be robust for any data and be automatable!

I have tried using fuzzywuzzy in python, but the results are not satisfactory. I have cleaned the data with the help of "re" package, hence need help with resolving the spellings and matching the fields or any new way of joining the tables without any other common fields.

PS: Cross join is not a solution as the relationship has to be one-one.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>