How do I get the union of unique list from two columns and three columns of a dataframe?
This is the dataframe I am working with:
Col1 Extract Col2 Extract Col3 Extract
------------ ------------ ------------
['unclassified'] ['sink', 'fridge'] ['unclassified']
['fridge', 'microwave'] ['fridge', 'stove'] ['sink']
['unclassified'] ['unclassified'] ['unclassified']
What I would like is the union of unique list for ('Col1 Extract' + 'Col2 Extract') and ('Col1 Extract' + 'Col2 Extract' + 'Col3 Extract') using pandas way. This is what I'm looking for:
Col1+Col2 Col1+Col2+Col3
------------ ---------------
['unclassified', 'sink', 'fridge'] ['unclassified', 'sink', 'fridge']
['fridge', 'microwave', 'stove'] ['fridge', 'microwave', 'stove', 'sink']
['unclassified'] ['unclassified']