title: Efficient loop through two Pandas DataFrames
body: <p>I have two pandas dataframes:</p>
  
  <p>The first frame contains a timestamp (Date + Time) and four sets of lat/long pairs that define the corners of a box on the earth.</p>
  
  <p>The second frame contains a timestamp and one lat/long pair that marks an event.</p>
  
  <p>I want to find out, for each event, whether it fell inside any of the 'boxes on the earth', and if so, which ones and what is the delta_t between the timestamps. </p>
  
  <p>The only way I can think of doing this is to loop through the second frame, row by row, and compare to the first frame.  I'm hoping for a more pythonic way, but nothing is coming to mind.  Any ideas?</p>
  
  <p>Thanks,</p>
  
  <p>SH</p>