I have below list which I have simplified :
my_list = ['select', 'fruit1', 'fruit2, 'fruit3', 'from', 'basket1',
'select', 'fruit4', 'from', 'basket2',
'select', 'fruit5', 'fruit6' 'from', 'basket3', ..... so on]
Note how my list has 'select' and 'from' statements.
The output I am trying to achieve is a DataFrame or let's say Excel output:
Fruit number Basket number
fruit1 basket1
fruit2 basket1
fruit3 basket1
fruit4 basket2
fruit5 basket3
fruit6 basket3
. .
. .
. .
. .
is there a way to achieve this result? I have tried many things but it won't work.. :(