title: Find duplicated value with different time index
body: <p>I'm new to pandas and would like to check if there are more efficient way to do what I would like to achieve.</p>
  <p>I have a customer master data change log for 12 months looks like below (the full file have 150K rows and 15 columns)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">date1</th>
  <th>changed_by</th>
  <th>customer</th>
  <th>field_name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">23/02/2021 18:59</td>
  <td>101852</td>
  <td>40001375</td>
  <td>Industry</td>
  </tr>
  <tr>
  <td style="text-align: left;">23/02/2021 18:59</td>
  <td>101852</td>
  <td>40001375</td>
  <td>Industry code 1</td>
  </tr>
  <tr>
  <td style="text-align: left;">23/02/2021 18:59</td>
  <td>101852</td>
  <td>40001375</td>
  <td>Region</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/12/2021 02:31</td>
  <td>119186</td>
  <td>30045194</td>
  <td>Postal Code</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/12/2021 02:31</td>
  <td>119186</td>
  <td>30045194</td>
  <td>Industry code 1</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/12/2021 02:31</td>
  <td>119186</td>
  <td>30045194</td>
  <td>Region</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/01/2021 03:31</td>
  <td>109209</td>
  <td>40001375</td>
  <td>Postal Code</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/01/2021 03:31</td>
  <td>109209</td>
  <td>40001375</td>
  <td>Industry code 1</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/01/2021 03:31</td>
  <td>109209</td>
  <td>40001375</td>
  <td>Bank</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to check if there are any customers' data being change more than once within the period, i.e. same customer ID but different date, then extract those line for further analysis.</p>
  <p>Below are the code I currently have and seems work ok.</p>
  <pre><code>pvz = df3.groupby(['date1','customer'])['field_name'].count().reset_index()
  pvz
  </code></pre>
  <p>Gives me</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">date1</th>
  <th>customer</th>
  <th>field_name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">23/02/2021 18:59</td>
  <td>40001375</td>
  <td>3</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/01/2021 03:31</td>
  <td>40001375</td>
  <td>3</td>
  </tr>
  <tr>
  <td style="text-align: left;">30/12/2021 02:31</td>
  <td>30045194</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Then I:</p>
  <pre><code>pvz[pvz.duplicated(subset='customer',keep=False)]
  </code></pre>
  <p>Return the below that seems ok:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>date1</th>
  <th>customer</th>
  <th>field_name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>23/02/2021 18:59</td>
  <td>40001375</td>
  <td>3</td>
  </tr>
  <tr>
  <td>30/01/2021 03:31</td>
  <td>40001375</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>As a beginner I would like to check</p>
  <ul>
  <li>if there are any suggestions on my code and if there are more efficient way to do what I would like to achieve</li>
  <li>I thought of set the date column to datetime index. But I do not know how to handle it afterward, and whether it would make my task any easier ?</li>
  </ul>
  <p>Thank you.</p>