Trying to see how hard or easy this is to do with Pandas.
Let's say one has a two columns with data such as:
Cat1 Cat2
A 1
A 2
A 3
B 1
B 2
C 1
C 2
C 3
D 4
As you see A and C have three common elements 1, 2, 3. B however has only two elements 1 and 2. D has only one element: 4.
How would one programmatically get to this same result. The idea will be to have each group returned somehow. So one will be [A, C] and [1, 2, 3], then [B] and [1, 2] and [D] with [4].
I know a program can be written to do this so I am trying to figure out if there is something on Pandas to do it without having to build stuff from scratch.
Thanks!