split list elements into sub-elements in pandas dataframe this one is super close - but rather than split all elements and put into one list, I need to put them into a sublist.
df:
col1
['this is list 1', 'this is list 2', 'this is another list 3']
['this is list 1', 'this is list 2', 'this is another list 3']
['this is list 1', 'this is list 2', 'this is another list 3']
I am trying to make the dataframe column look like this:
col1
[['this', 'is', 'list', '1'], ['this', 'is', 'list', '2'], ['this', 'is', 'another', lis't', '3']]
[['this', 'is', 'list', '1'], ['this', 'is', 'list', '2'], ['this', 'is', 'another', lis't', '3']]
[['this', 'is', 'list', '1'], ['this', 'is', 'list', '2'], ['this', 'is', 'another', lis't', '3']]
Basically split the elements in the list into sublists where each word is the elements/items in the sublist, all within a pandas df column