title: Get rid of data if there are less than 3 data points in the hour
body: <p>I am fairly new to this so please bear with me. I have a df where the index is in datetime format. My other columns are concentration and a count column that just consists of 1s.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Timestamp</th>
  <th style="text-align: center;">Concentration</th>
  <th style="text-align: right;">Count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">2018-01-01 08:07:00</td>
  <td style="text-align: center;">32.675305</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2018-01-01 08:20:00</td>
  <td style="text-align: center;">22.816844</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2018-01-01 08:28:00</td>
  <td style="text-align: center;">17.183438</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2018-01-01 08:37:00</td>
  <td style="text-align: center;">18.591789</td>
  <td style="text-align: right;">1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to clean up the df by only including data where there are at least 3 concentration values recorded in the hour.</p>
  <p>I tried resampling by hour and then getting a sum of the count column which shows me if the number of data points per hour meets the threshold of 3. And then I can get rid of rows where count is less than 3.</p>
  <pre><code>df2 = df.resample('H').sum()
  df3 = df2[~(df2['Count'] &lt; 3)]
  </code></pre>
  <p>From here, though, the concentrations have also been summed, which eventually I don't want. I'm wondering if there is a way to go back to before I resampled but without the purged data?</p>
  <p>Is there another way to do this that would work better?</p>