title: Python Pandas pattern serching
body: <p>Good evening,
  I have a question about detecting certain pattern. I don't know whether my question has specific terminology.</p>
  <p>I have a pandas dataframe like this:</p>
  <pre><code>              0       1   ...          8
  0           date    price ...     pattern
  1     2021-01-01   31.18  ...         0
  2     2021-01-02   20.32  ...         1
  3     2021-01-03   10.32  ...         1
  4     2021-01-04   21.32  ...         -1
  5     2021-01-05   44.32  ...         0
  6     2021-01-06   45.32  ...         -1
  7     2021-01-07   41.32  ...         1
  8     2021-01-08   78.32  ...         -1
  9     2021-01-09   44.32  ...         1
  10    2021-01-10   123.32  ...         1
  11    2021-01-11   25.32  ...         -1
  </code></pre>
  <p>How can I detect the pattern which is [-1 following after 1] in IF statement.</p>
  <p>For example:</p>
  <p>Grabbing price column from index 3 and 4 because pattern column at index 3 is 1 and index 4 is -1 which match my condition.
  Next would be  index 7 and 8 then index 10 and 11.
  I probably convey my question pretty vague, however I don't really know how to describe it.</p>