calculate the repittion of values in pandas dataframe in python. code example Example: count how many duplicates python pandas df.duplicated(subset='one', keep='first').sum()