title: find overlaps using pandas
body: <p>file1 :</p>
  
  <pre><code>col0 col1 col2 col3
  1    20   10   -
  1    25   30   +
  2    50   40   -
  2    60   70   +
  </code></pre>
  
  <p>file2:</p>
  
  <pre><code>col0 col1 col2 col3 col4 col5
  1    25   5   -     e1    e2
  1    20   30   +    e4    e24
  2    45   35   -    e9    e12
  2    55   75   +    e10    e21
  </code></pre>
  
  <p>I need to check for 3 conditions :
  1) check if element in col0 is same (1 ==1)</p>
  
  <p>2) if yes then check the col3 if its  - or +, if - then the col1 value will be higher than col2 and the opposite if its +,</p>
  
  <p>3) check if the range is within the col1 and col2 from file2 i.e 
     in row two 25-30 fall within the range 20-30 if all conditions met, out put rows in file 1 and col4 and col5 in file 2 (which are some meta info)</p>
  
  <pre><code>col0 col1 col2 col3 col4 col5
  1    20   10   -    e1    e2
  1    25   30   +    e4    e24
  2    50   40   -    e9    e12
  2    60   70   +    e10   e21
  </code></pre>
  
  <p>simple python code would have a condition like this </p>
  
  <pre><code>for i in file1:
      for j in file2:
          if i[1]&lt;j[1] and i[2]&lt;j[2] and i[0]==j[0]:
             print j
  </code></pre>
  
  <p>not sure how to account for the sign, How can i achieve this using pandas, or pandas would not be a right approach? </p>