I have this code:
d = {'col1': [1, 2, 3, 4, 5, 6], 'col2': [7, 8, 9, 10, 11, 12], 'is_new_group': [True, False, False, True, False, False] }
pd.DataFrame(d)
I would like to divide the data into groups.
Every group will start at the index of the first row where is_new_group is True, and end when a new is_new_group is True
In this case, it should divide the data into 2 groups:
The first 3 rows, and the last 3 rows:

I found the `pd.groupby```.
according to the documentation, the by parameter: mapping, function, label, or list of labels.
But this is a different situation.
How can group the values according to the demands?
