python pandas dataframe idenfity duplicate column names code example Example: remove duplicate columns python dataframe df = df.loc[:,~df.columns.duplicated()]