title: Pandas: split dataframe on signal threshold
body: <p>I have a pandas dataframe where I've identified some regions that I'd like to split and analyze independently. For example here are five distinct regions:</p>
  
  <p><a href="https://i.stack.imgur.com/aYKrS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aYKrS.png" alt="enter image description here"></a></p>
  
  <p>generated from</p>
  
  <pre><code>df["signal"] = df["average"] &gt; 0.70
  df["blocked_signal"] = convolve1d(df.signal, [1,1,0,1,1])
  </code></pre>
  
  <p>How do I create five separate regions from the <code>blocked_signal</code> column?</p>