how to remove duplicate column names from a sql dataframe pandas code example Example: remove duplicate columns python dataframe df = df.loc[:,~df.columns.duplicated()]