title: Get row prior to datetimeindex for conditional calculation
body: <p>I have a 2 dataframes <code>df1</code> and <code>df2</code>(a list of values) using <code>datetimeindexes</code>. I want to perform a conditional calculated field when the 2 <code>datetimeindexes</code> match. When they match, I would like to access the prior row <code>df1</code>.  I would like to and perform the following calc.</p>
  
  <pre><code>df1['calc']=df1.where(df1.index==df2, 
                        df1['High']/df1['Close'].shift(1),
                        df1.['Close']/df1['Close].shift(1))
  </code></pre>
  
  <p>here is <code>df1</code>.</p>
  
  <pre><code>    Open    High    Low Close   Volume
  Date_Time                   
  2012-08-30  9:40:00 1273.25 1273.25 1273.25 1273.25 1
  2012-08-30  9:50:00 1273.25 1273.25 1273.25 1273.25 1
  2012-08-30 10:00:00 1273.25 1273.25 1273.25 1273.25 2
  2012-08-30 10:10:00 1274.25 1274.50 1274.25 1274.50 3
  2012-08-30 10:20:00 1274.00 1274.00 1274.00 1274.00 5
  </code></pre>
  
  <p>this is the list of times in <code>df2</code>:</p>
  
  <pre><code>2012-08-29   2012-08-29 15:40:00
  2012-08-30   2012-08-30 10:00:00
  2012-08-31   2012-08-31 10:50:00
  2012-09-04   2012-09-04 15:50:00
  2012-09-05   2012-09-05 10:50:00
  2012-09-10   2012-09-10 12:30:00
  2012-09-12   2012-09-12 09:50:00
  2012-09-14   2012-09-14 15:20:00
  2012-09-19   2012-09-19 10:30:00
  </code></pre>
  
  <p>I tried to use <code>.get_loc</code>, <code>.loc</code>,and <code>.loc</code>.  I tried masking but that only accesses the prior row of the masked dateframe.   Thanks.</p>