I have a text file called tropical.txt that have multiple lists that looks like this
['papaya', 'mangosteen', 'banana']
[]
['coconut', 'mango']
How can I read it into a pandas dataframe such that my final output will look like this? fruits is my column name in the expected output.
fruits
0 [apple, orange, banana]
1 []
2 [pineapple, mango]
I tried
pd.read_csv('tropical.txt')
But it's giving me a parse error
ParserError: Error tokenizing data. C error: Expected 16 fields in line 3, saw 21