I'm trying to remove duplicate words in a cell to clean up data dealing with first and last names (husband and wife).
Current Desired
0 John Doe and Jane Doe John Doe and Jane doe
1 John Doe and John Doe John Doe
2 John Doe John Doe
3 Jane Doe and Jane Doe Jane Doe
4 Jane Doe and Jane Jane Doe
5 John and John Doe John Doe
I have the following that works well with cleaning up John and John to John:
df['out'] = df.Current.str.split(' and ').map(lambda x : ' and '.join(set(x)))
How can I adjust my code to account for other cases to clean up first and last names?