I have a list that I'm trying to add to a dataframe. It looks something like this:
list_one = ['apple','banana','cherry',' ', 'grape', 'orange', 'pineapple','']
If I add the list to a dataframe, using df = pd.DataFrame({'list_one':list_one}) it'll look like this:
list_one
-------------
0 apple
1 banana
2 cherry
3
4 grape
5 orange
6 pineapple
7
I want the combine some of the rows into one row, so that the dataframe looks something like this:
list_one
-----------------------------
0 apple, banana, cherry
1 grape, orange, pineapple
Is there a simple way to do this?
Thank you for taking the time to read my question and help in any way you can.