unique words from pandas

results = set()
df['text'].str.lower().str.split().apply(results.update)

Here is what the above code is Doing:
1. We’re using the apply method on the text column of the dataframe.
2. We’re using the update method on the set object to add the words from each row to the set.
3. We’re using the str.lower method to make sure all the words are lowercase.
4. We’re using the str.split method to split the text into a list of words.