Answer the question
In order to leave comments, you need to log in
How to display the names of the columns of a csv file in which there is a duplicate cell value?
python 3, pandas latest version.
There is a csv file.
Strings - product url.
Columns - product categories. (That is, one product can be in several categories, as often happens)
Tell me the optimal (or any) algorithm that for each cell will return a list of column names where its duplicate occurs.
Thank you!
Answer the question
In order to leave comments, you need to log in
Rotate the table so that each row has a pair of (url, category (which used to be a column name)).
Then search for duplicate rows.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question