In pandas, you can do this by:
df.loc[:,~df.columns.duplicated()]
df.columns.duplicated()
returns a boolean array that denotes duplicate columns
In pandas, you can do this by:
df.loc[:,~df.columns.duplicated()]
df.columns.duplicated()
returns a boolean array that denotes duplicate columns
give this a try, see if it's what you wanted
df.unique()
https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.unique.html