I have a dataset in which there is a column that has all the clicks data. There are 12 main keywords and if any of this keywords are found in the data then software should give the result till the stop keyword appears which are "Home" and keywords.
For example:
column:
a
b
d
g
d
home
f
v
b
p
home
The keywords are : b and f So the software should start from b and stop whenever it encounters home or b or f and this would be 1st output(b d g d home) then it should again start from F and stop at home or b or f (f v) this will be second output and then it will again start from b and stop if it encounters b,f or home (b,p,home) this will be my 3rd output. Please help me with the code. Thank you!