how to iterate through records in a pandas dataframe to find duplicate fields and check conditions of all the duplicates code example
Example: python - show repeted values in a column
df = df[df.duplicated(subset=['val1','val2'], keep=False)]
df = df[df.duplicated(subset=['val1','val2'], keep=False)]