title: Generate Column Value in Pandas based on previous rows
body: <p>Let us assume I am taking a temperature measurement on a regular interval and recording the values in a Pandas Dataframe</p>
  
  <pre><code>day   temperature [F]
  0       89          
  1       91         
  2       93         
  3       88            
  4       90
  </code></pre>
  
  <p>Now I want to create another column which is set to 1 if and only if the two previous values are above a certain level. In my scenario I want to create a column value of 1 if the two consecutive values are above 90, thus yielding   </p>
  
  <pre><code>day   temperature        Above limit?
  0       89               0
  1       91               0
  2       93               1
  3       88               0
  4       91               0
  5       91               1
  6       93               1
  </code></pre>
  
  <p>Despite some SO and Google digging, it's not clear if I can use iloc[x], loc[x] or something else in a for loop?</p>