remove all duplicted columns where value are equal pandas code example Example: remove duplicate columns python dataframe df = df.loc[:,~df.columns.duplicated()]