Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get unique words from pandas dataframe

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

$ set(['someone', 'ft.jgt', 'my', 'is', 'to', 'going', 'place', 'nickname'])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unique #words #pandas #dataframe
ADD COMMENT
Topic
Name
6+6 =