df drop the first column with given name if two cols same name code example Example: python - remove columns with same name and keep first df1 = df.loc[:, ~df.columns.duplicated()]