pandas get unique dataframe code example
Example 1: pandas unique values in column
#List unique values in the df['name'] column
df.name.unique()
Example 2: dataframe python unique values rows
# get the unique values (rows)
df.drop_duplicates()
Example 3: 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'])