title: Merge two pandas dataframes that have slightly different values on the column which is being merged
body: <p>How can I merge two data frames when the column has a slight offset than the column I am merging to?</p>
  <p>df1 =</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>col1</th>
  <th>col2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>a</td>
  </tr>
  <tr>
  <td>2</td>
  <td>b</td>
  </tr>
  <tr>
  <td>3</td>
  <td>c</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>df2 =</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>col1</th>
  <th>col3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1.01</td>
  <td>d</td>
  </tr>
  <tr>
  <td>2</td>
  <td>e</td>
  </tr>
  <tr>
  <td>2.95</td>
  <td>f</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>so, the merged column would end up like this even though the values in col1 are slightly different.</p>
  <p>df_merge =</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>col1</th>
  <th>col2</th>
  <th>col3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>a</td>
  <td>d</td>
  </tr>
  <tr>
  <td>2</td>
  <td>b</td>
  <td>e</td>
  </tr>
  <tr>
  <td>3</td>
  <td>c</td>
  <td>f</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have seen scenarios like this where &quot;col1&quot; is a string, but I'm wondering if it's possible to do this with something like <code>pandas.merge()</code> in the scenario where there is slight numerical offset (e.g +/- 0.05).</p>