pandas duplicated columns code example
Example 1: python - remove repeted columns in a df
df.loc[:,~df.T.duplicated(keep='first')]
Example 2: python - show repeted values in a column
df = df[df.duplicated(subset=['val1','val2'], keep=False)]
df.loc[:,~df.T.duplicated(keep='first')]
df = df[df.duplicated(subset=['val1','val2'], keep=False)]