pandas Find Duplicate Rows based on selected columns and choose the right one code example
Example 1: select duplicates in sql
SELECT username, email, COUNT(*)
FROM users
GROUP BY username, email
HAVING COUNT(*) > 1
Example 2: python - show repeted values in a column
df = df[df.duplicated(subset=['val1','val2'], keep=False)]