I have a dataframe with different dtypes
like int, float, object, datatime etc. I am performing data cleaning
, to list or find duplicate column names in the dataframe.
Duplicate criteria as below:
- same column names or
- columns having same data values
I tried using transpose approach df.T.duplicated()
to list duplicate column names, But seems slow for big dataframe.
I come to know we can use pivot
or pivot_table
or corr
to list duplicate column names.
Can someone explain how to use and interpret it Or Is there any other way to do it?