how to check for duplicate columns in pandas code example Example: python - remove repeted columns in a df df.loc[:,~df.T.duplicated(keep='first')]