deleting duplicate rows in pandas due to a column code example Example: remove duplicate columns python dataframe df = df.loc[:,~df.columns.duplicated()]