get unique values in a column pandas and add it to a new column code example
Example 1: dataframe unique values in each column
for col in df:
print(df[col].unique())
Example 2: unique values in dataframe column
#List unique values in the df['name'] column
df.name.unique()