I have a cvs file with one column and 300,000 individual text lines, which I would like to convert into a list of list. So that I get a list of 300,000 lists, with every sentence readable as a string.
When I open the csv as a DataFrame and convert it into a series, every sentence is split into letter.
sentence = pd.read_csv("myfile.csv", encoding='utf-8')
sentence = pd.Series([sentence])
sentence = sentence.tolist()
This gives:
[[('W', 'h', 'a', 't', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 's', 't', 'e', 'p'
Instead, what I would like is for example when I would print(sentence), it would show:
[['What is the step by step approach for building a house?'],['The
first step is securing an adequate plot.'] etc....]
Is there a simple way to do this?