title: pandas group dataframe until a specific value
body: <p>I have this code:</p>
  <pre><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)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/MVuUR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MVuUR.png" alt="enter image description here" /></a></p>
  <p>I would like to divide the data into groups.
  Every group will start at the index of the first row where <code>is_new_group</code> is <code>True</code>, and end when a new <code>is_new_group</code>  is <code>True</code></p>
  <p>In this case, it should divide the data into 2 groups:
  The first 3 rows, and the last 3 rows:
  <a href="https://i.stack.imgur.com/pJEh8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pJEh8.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/1fkQF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1fkQF.png" alt="enter image description here" /></a></p>
  <p>I found the `pd.groupby```.</p>
  <p>according to the documentation, the <code>by</code> parameter: <code>mapping, function, label, or list of labels</code>.</p>
  <p>But this is a different situation.</p>
  <p>How can group the values according to the demands?</p>