title: Fastest way to merge pandas dataframe on ranges
body: <p>I have a <code>dataframe A</code> </p>
  
  <pre><code>    ip_address
  0   13
  1   5
  2   20
  3   11
  .. ........
  </code></pre>
  
  <p>and another <code>dataframe B</code> </p>
  
  <pre><code>    lowerbound_ip_address   upperbound_ip_address           country
  0    0                       10                             Australia
  1    11                      20                             China
  </code></pre>
  
  <p>based on this I need to add a column in <code>A</code> such that</p>
  
  <pre><code>ip_address  country
  13          China
  5           Australia
  </code></pre>
  
  <p>I have an idea that I should write define a function and then call map on each row of A. But how would I search through each row of B for this. Is there a better way to do this. </p>