title: Keep rows of a pandas dataframe based on both row and column conditions
body: <p>Hello I have a pandas dataframe that I want to clean.Here is an example:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>IDBILL</th>
  <th>IDBUYER</th>
  <th>BILL</th>
  <th>DATE</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>001</td>
  <td>768787</td>
  <td>45</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>001</td>
  <td>768787</td>
  <td>67</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>001</td>
  <td>768787</td>
  <td>98</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>30</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>15</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>12</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>005</td>
  <td>786545</td>
  <td>45</td>
  <td>1897-08-19</td>
  </tr>
  <tr>
  <td>008</td>
  <td>657676</td>
  <td>89</td>
  <td>1989-09-23</td>
  </tr>
  <tr>
  <td>009</td>
  <td>657676</td>
  <td>42</td>
  <td>1989-09-23</td>
  </tr>
  <tr>
  <td>010</td>
  <td>657676</td>
  <td>18</td>
  <td>1989-09-23</td>
  </tr>
  <tr>
  <td>012</td>
  <td>657676</td>
  <td>51</td>
  <td>1990-03-10</td>
  </tr>
  <tr>
  <td>016</td>
  <td>892354</td>
  <td>73</td>
  <td>1990-03-10</td>
  </tr>
  <tr>
  <td>018</td>
  <td>892354</td>
  <td>48</td>
  <td>1765-02-14</td>
  </tr>
  <tr>
  <td>020</td>
  <td>892354</td>
  <td>62</td>
  <td>1765-02-14</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to delete the highest bills(and keep the lowest when the bills are made on the same day, by the same IDBUYER, and whose bills IDs follow each other.
  To get this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>IDBILL</th>
  <th>IDBUYER</th>
  <th>BILL</th>
  <th>DATE</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>30</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>15</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>002</td>
  <td>768787</td>
  <td>12</td>
  <td>1897-07-24</td>
  </tr>
  <tr>
  <td>005</td>
  <td>786545</td>
  <td>45</td>
  <td>1897-08-19</td>
  </tr>
  <tr>
  <td>010</td>
  <td>657676</td>
  <td>18</td>
  <td>1989-09-23</td>
  </tr>
  <tr>
  <td>012</td>
  <td>657676</td>
  <td>51</td>
  <td>1990-03-10</td>
  </tr>
  <tr>
  <td>016</td>
  <td>892354</td>
  <td>73</td>
  <td>1990-03-10</td>
  </tr>
  <tr>
  <td>018</td>
  <td>892354</td>
  <td>48</td>
  <td>1765-02-14</td>
  </tr>
  <tr>
  <td>020</td>
  <td>892354</td>
  <td>62</td>
  <td>1765-02-14</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Thank you in advance</p>