pandas code to count duplicates in one column and put it in another column code example
Example: count how many duplicates python pandas
df.duplicated(subset='one', keep='first').sum()
df.duplicated(subset='one', keep='first').sum()