For my dataframe, e.g.
df = pd.DataFrame([1, 3, 7, 1], columns=[\'data\'])
I want to know for each index if the value is unique in the col
from collections import Counter c = Counter(df.client.to_list()) df["new_col"] = df.client.apply(lambda x:not(c[x] >1) )