title: Binning a dataframe when a condition matches in a second dataframe
body: <p>Good morning all.
  I want to create a binning column in my main dataframe using data from a second one.
  Dataframe#1 has &quot;Runner ID&quot; and &quot;Cumulative Distance&quot; columns. Dataframe#2 has &quot;Runner ID&quot;, &quot;Section Start&quot; and &quot;Section Name&quot; columns
  I'm trying to create a third column on Dataframe #1 named &quot;Section Name Binning&quot; based on matching &quot;Runner ID&quot; in both dataframes, and then binning &quot;Cumulative Distance&quot; from Dataframe#1 using the data from columns &quot;Section Start&quot; and &quot;Section Name&quot; from Dataframe#2.
  &quot;Cumulative Distance&quot; from Dataframe#1 and &quot;Section Start&quot; from Dataframe#2 will always be in increasing order and they restart when &quot;Runner ID&quot; changes.
  Attached a picture and Dataframes samples.
  As always appreciating your support.</p>
  <p>Dataframes for binning
  <a href="https://i.stack.imgur.com/VJ9AD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJ9AD.jpg" alt="Dataframes for binning" /></a></p>
  <pre><code>df1=pd.DataFrame({'Runner_ID':['John','John','John','John','John','John','John','John','John','John','John','Jen','Jen','Jen','Jen','Jen','Jen','Jen','Jen','Jen','Jen','Jen'],'Cumulative_Distance':[1,1.5,1.8,3,3.2,3.7,4,4.3,5,6.6,8,2,2.3,2.8,3.2,3.5,3.9,4.8,5,5.3,5.8,6]})
  
  df2=pd.DataFrame({'Runner_ID':['John','John','John','Jen','Jen','Jen','Jen'],'Section_Start':[0,3,5,0,2.5,3.5,5], 'Section_Name':['Flats', 'Uphill', 'Downhill', 'Flats', 'Uphill','Curve', 'Downhill']})
  </code></pre>