I have a dataframe with two series x and y. I want to merge them to create a new series: tag, but I'm not able to achieve the expected output. I've tried:
df['tag'] = df['x'] + df['y']
I've looked everywhere and haven't been able to find a solution to the problem.
Current output:
x y tag
['fast food', 'american'] ['chicken'] ['fast food', 'american']['chicken']
Expected output:
x y tag
['fast food', 'american'] ['chicken'] ['fast food', 'american', 'chicken']
df.to_dict()
{'x': "['fast food', 'american']",
'y': "['chicken']"}
