title: Get rows from Pandas DataFrame from index until condition
body: <p>Let's say I have a Pandas DataFrame:</p>
  
  <pre><code>x = pd.DataFrame(data=[5,4,3,2,1,0,1,2,3,4,5],columns=['value'])
  x
  Out[9]: 
      value
  0       5
  1       4
  2       3
  3       2
  4       1
  5       0
  6       1
  7       2
  8       3
  9       4
  10      5
  </code></pre>
  
  <p>Now, I want to, given an index, find rows in <code>x</code> until a condition is met.
  For example, if <code>index = 2</code>:</p>
  
  <pre><code>x.loc[2]
  Out[14]: 
  value    3
  Name: 2, dtype: int64
  </code></pre>
  
  <p>Now I want to, from that <code>index</code>, find the next <code>n</code> rows where the value is greater than some <code>threshold</code>. For example, if the <code>threshold is 0</code>, the results should be:</p>
  
  <pre><code>x
  Out[9]: 
      value
  2       3
  3       2
  4       1
  5       0
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>I have tried:</p>
  
  <pre><code>x.loc[2:x['value']&gt;0,:]
  </code></pre>
  
  <p>But of course this will not work because <code>x['value']&gt;0</code> returns a boolean array of:</p>
  
  <pre><code>Out[20]: 
  0      True
  1      True
  2      True
  3      True
  4      True
  5     False
  6      True
  7      True
  8      True
  9      True
  10     True
  Name: value, dtype: bool
  </code></pre>