title: Find value greater than level - Python Pandas
body: <p>In a time series (ordered tuples), what's the most efficient way to find the first time a criterion is met? </p>
  
  <p>In particular, what's the most efficient way to determine when a value goes over 100 for the value of a column in a pandas data frame?</p>
  
  <p>I was hoping for a clever vectorized solution, and not having to use <code>df.iterrows()</code>.</p>
  
  <p>For example, for price or count data, when a value exceeds 100. I.e. df['col'] > 100.</p>
  
  <pre><code>              price
  date 
  2005-01-01     98
  2005-01-02     99
  2005-01-03     100
  2005-01-04     99
  2005-01-05     98
  2005-01-06     100
  2005-01-07     100
  2005-01-08     98
  </code></pre>
  
  <p>but for potentially very large series. Is it better to iterate (slow) or is there a vectorized solution?</p>
  
  <p>A <code>df.iterrows()</code> solution could be: </p>
  
  <pre><code>for row, ind in df.iterrows():
      if row['col'] &gt; value_to_check:
          breakpoint = row['value_to_record'].loc[ind]
          return breakpoint
  return None
  </code></pre>
  
  <p>But my question is more about efficiency (potentially, a vectorized solution that will scale well).</p>