title: Pandas dataframe: Based on some current row R1, find another row R2 for which all rows in between match a condition
body: <p>Given the following exemplary dataframe/series,
  I have - for some given reason - identified row number 6 as the relevant base row and I now want to find the row where the unbroken series of ones started (in this case that is row 3).</p>
  <p>I explicitly do not want to find the first row containing a one (which would be row 0) but I want to find the row for which the following holds: Starting from our base row (row 6) go up until you don't find a one anymore. Then return the index of this row.</p>
  <pre><code>    A
  0   1
  1   0
  2   0
  3   1
  4   1
  5   1
  6   1
  7   1
  8   0
  9   0
  </code></pre>
  <p>I hope this is somewhat clear. Thanks for any suggestions!</p>
  <p>Also I am grateful for approaches that can be generically adapted to cases where for example</p>
  <ul>
  <li>the base row itself does not have a one itself (in that case its about finding the start of some previous series of ones within this column)</li>
  <li>maybe I am not interested in the one-series that was previous but rather the one that followed.</li>
  </ul>