title: Mapping values in one DataFrame based on the data from external data table
body: <p>I have DF as below of actual features' values (more than 6000 rows):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  <th>C</th>
  <th>D</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>A</td>
  <td>acc</td>
  <td>?</td>
  </tr>
  <tr>
  <td>2</td>
  <td>B</td>
  <td>bcc</td>
  <td>?</td>
  </tr>
  <tr>
  <td>5</td>
  <td>T</td>
  <td>aoo</td>
  <td>?</td>
  </tr>
  <tr>
  <td>1</td>
  <td>V</td>
  <td>mlo</td>
  <td>?</td>
  </tr>
  <tr>
  <td>5</td>
  <td>C</td>
  <td>aeo</td>
  <td>?</td>
  </tr>
  <tr>
  <td>3</td>
  <td>A</td>
  <td>aoo</td>
  <td>?</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and I need to match output value D from DF according to data table below (DT) (less than 50 rows):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A min</th>
  <th>A max</th>
  <th>B</th>
  <th>C</th>
  <th>D</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>5</td>
  <td>A</td>
  <td>acc</td>
  <td>120</td>
  </tr>
  <tr>
  <td>1</td>
  <td>5</td>
  <td>T</td>
  <td>bcc</td>
  <td>131</td>
  </tr>
  <tr>
  <td>2</td>
  <td>3</td>
  <td>A</td>
  <td>bcc</td>
  <td>129</td>
  </tr>
  <tr>
  <td>2</td>
  <td>3</td>
  <td>B</td>
  <td>aoo</td>
  <td>134</td>
  </tr>
  <tr>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td>...</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>each row in DF should have some D even if there is no exact match in DT (the closest one from DT or a mean from D values in DT if several rows match the given row from DF). Is there any clean approach to map those values?</p>