I have a pandas data frame that looks like this.
Column1 Column2 Column3
0 DS 4.5 Hard
1 ML 2.5 Medium
2 CS 4 Hard
I want to check if any column is having a duplicate value if yes then need to store the unique value of that column in another df and store its index in the original position.
Like in this case we will have output as two df like below:
df1:
Column1 Column2 Column3
0 DS 4.5 0
1 ML 2.5 1
2 CS 4 0
d2:
Column1
0 Hard
1 Medium