I am using Python Pandas. I have a column with a row, and I would like to have an intersection between the columns.
For example, I have the following input
1: Andi 2: Andi, Cindy 3: Thomas, Cindy 4: Cindy, Thomas
And I would like to have the following output:
Therefore, the combination of Andy and Thomas does not appear in the data, but Cindy and Thomas appear twice.
Andi Thomas Cindy Andi 1 0 1 Thomas 0 1 2 Cindy 1 2 1
Does anyone know how I can handle this? It would be great!
Thank you very much and welcome
Andy
source share