Reputation: 387
I have a dataframe as following:
id|words
1|ant,bat,cat
2|mat,rat,pat
I want the words column to be as follows:
id|words
1|['ant','bat','cat']
2|['mat','rat','pat']
How could I do it? I tried with literaleval but it shows exception
Upvotes: 2
Views: 50