Tags merger in dataset

Hello everybody!
I have a question about the dataset modification.
For example, I have the dataset:

row1 row2
1 a ['tag1', 'tag2', 'tag3']
2 a ['tag2', 'tag3', 'tag4']
3 a ['tag2', 'tag3', 'tag5']

And I want to made:

row1 row2
1 a ['tag1', 'tag2', 'tag3', 'tag4', 'tag5']

Both rows have an object type.

Please tell me how to do this. Thanks in advance.

Hi Kira,

I am not sure whether I understood correctly what you are aiming for, but if you just want to merge all tags and ensure, that each one just occurs once, you could us sets, as:

sorted( list(set(['tag1', 'tag2', 'tag3'] + ['tag2', 'tag3', 'tag4'] + ['tag2', 'tag3', 'tag5'])) )

leads to

['tag1', 'tag2', 'tag3', 'tag4', 'tag5']

Cheers, Dominik