I have a dataFrame with 12 columns and one of those columns has multiple values separated by commas, for example:
I need to create a list that contains each word separated by commas in the column tags (non duplicated values).
I tried with this code:
data['tags'].to_list()
But it gave me a list of strings that represent each row in the tags column, like this:
output: ['twitter, literature','muslim, weather, donald trump, conservative, twitter, conspiracy theory, tornado, elementary school, tornado drill','lgbtq, twitter, gay culture, relationships,...]
What I really need is, for example:
[twitter, literature,muslim, weather, donald trump, conservative, conspiracy theory, tornado, elementary school, tornado drill,lgbtq, gay culture, relationships,...]
Do you have a better idea? :) Many thanks in advance!!