I want to paste consecutive values in a dataframe into a new column in the same dataframe.
my dataframe is this:
| x | y | 
|---|---|
| blue | A234 | 
| green,black | A5 | 
| yellow | A6 | 
| blue,green,purple | A7 | 
I want to have a third column 'z', that will paste the values in 'x', like this:
| x | y | z | 
|---|---|---|
| blue | A234 | blue | 
| green,black | A5 | blue,green,black | 
| yellow | A6 | blue,green,black,yellow | 
| blue,green,purple | A7 | blue,green,purple,blue,green,black,yellow |