title: Python Pandas: drop duplicate rows (keep only first row) based on same id and same date
body: <p>I have a dataframe that looks like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>seen</th>
  <th>year</th>
  <th>month</th>
  <th>day</th>
  <th>dayname</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>f907942e330ac3653f8a9bd655770872</td>
  <td>2021-06-02 16:34:56</td>
  <td>2021</td>
  <td>6</td>
  <td>1</td>
  <td>Monday</td>
  </tr>
  <tr>
  <td>042b60106231fa8a8e43dd750432d5bc</td>
  <td>2021-06-02 16:13:29</td>
  <td>2021</td>
  <td>6</td>
  <td>1</td>
  <td>Monday</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The ID column has repeated values, due to the fact that it creates an entry when a user enters a building and a second one when it leaves it.</p>
  <p><strong>What I want to do is delete all the repeated id values for each day</strong>. For example, a person can go to that building on monday 01/01/2021 and again on wednesday 01/03/2021, given that, 4 entries are created, 2 for monday and 2 for wednesday, I just want to keep one for each specific date.</p>
  <p>As you can imagine, I've tried things like <code>df_filtered = df.sort_values([&quot;seen&quot;]).drop_duplicates(&quot;id&quot;)</code> but it doesn't work for me as it deletes ALL of the duplicated values across the dataframe.</p>
  <p>How can I drop the duplicated ID's (and their respective rows) on each single day without affecting the other days?</p>
  <p>Thanks in advance.</p>