I have a dataframe that looks something like this:
Row ID1 ID2 Colors1 Colors2
1 1 2 Green, Blue Red, Orange
2 1 3 Green, Orange Orange, Red
I would like to create a calculation that tells me the count of colors in common between Colors1 and Colors2. The desired result is the following:
Row ID1 ID2 Colors1 Colors2 Common
1 1 2 Green, Blue, Purple Green, Purple 2 #Green, Purple
2 1 3 Green, Orange Orange, Red 1 #Orange