title: Pandas iterate over DataFrame row pairs
body: <p>How can I iterate over pairs of rows of a Pandas DataFrame?</p>
  
  <p>For example:</p>
  
  <pre><code>content = [(1,2,[1,3]),(3,4,[2,4]),(5,6,[6,9]),(7,8,[9,10])]
  df = pd.DataFrame( content, columns=["a","b","interval"])
  print df
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>   a  b interval
  0  1  2   [1, 3]
  1  3  4   [2, 4]
  2  5  6   [6, 9]
  3  7  8  [9, 10]
  </code></pre>
  
  <p>Now I would like to do something like</p>
  
  <pre><code>for (indx1,row1), (indx2,row2) in df.?
      print "row1:\n", row1
      print "row2:\n", row2
      print "\n"
  </code></pre>
  
  <p>which should output</p>
  
  <pre><code>row1:
  a    1
  b    2
  interval    [1,3]
  Name: 0, dtype: int64
  row2:
  a    3
  b    4
  interval    [2,4]
  Name: 1, dtype: int64
  
  row1:
  a    3
  b    4
  interval    [2,4]
  Name: 1, dtype: int64
  row2:
  a    5
  b    6
  interval    [6,9]
  Name: 2, dtype: int64
  
  row1:
  a    5
  b    6
  interval    [6,9]
  Name: 2, dtype: int64
  row2:
  a    7
  b    8
  interval    [9,10]
  Name: 3, dtype: int64
  </code></pre>
  
  <p>Is there a builtin way to achieve this?
  I looked at df.groupby(df.index // 2) and df.itertuples but none of these methods seems to do what I want.</p>
  
  <p><strong>Edit:</strong>
  The overall goal is to get a list of bools indicating whether the intervals in column "interval" overlap. In the above example the list would be</p>
  
  <pre><code>overlaps = [True, False, False]
  </code></pre>
  
  <p>So one bool for each pair.</p>