I am trying to remove duplicate words in strings in my data frame per row.
Say my data frame looks like this:
In:
Yes Yes Absolutely
No No Nope
Win Win Lose
for row in df.iterrows():
row["Sentence"] = (list(set(row["Sentence"])))
Desired Out:
Yes Absolutely
No Nope
Win Lose
How can I clean, each row to remove the duplicate strings. I have tried the above code.
Any links to any docs or sources would be greatly appreciated if they can lead me in the right direction. Thank you.