I have a Series of names. If a name is repeated, I'd like to have only one.
John Smith
David BrownDavid Brown
I'd like to have output
John Smith
David Brown
I found ways to use '\b(\w+)( \1\b)+' to catch the white space between names and keep the second one with r'\1'. However, in my case, there is no whitespace. Does that mean I need to compare strings character by character to find duplicates? Is there any simpler way ?