count duplicate row pandas code example
Example 1: count how many duplicates python pandas
df.duplicated(subset='one', keep='first').sum()
Example 2: count duplicates in one column pandas
df.pivot_table(index=['DataFrame Column'], aggfunc='size')