I have the following Pandas DF:
0 | A
1 | B
2 | A
3 | A
4 | B
5 | A
6 | B
7 | B
8 | A
9 | A
I want to slice this single DF into multiple ones along B values so that I omit all Bs and got all the consecutive A rows as the respective resulting DFs like this:
df#1:
0 | A
df#2:
2 | A
3 | A
df#3:
5 | A
df#4:
8 | A
9 | A
Order of A-rows must be kept. How to perform this action? (The actual task is a time series of relevant events that must be handled as one event separated by irrelevant events.)