I have two files that contains the full names of people from two different sources. I want to create a column that will determine whether the names match, have additional names or no match. I have merged both files using a common ID. How do I do this in python?
I tried this code but it just showed exact match and every other thing as no match.
import numpy as np
df['Match1'] = np.where(
df['t1_full_name'].str.split().apply(sorted).apply(Counter)
== df['t2_full_name'].str.split().apply(sorted).apply(Counter),
'match', 'no match'
)