title: How to get min() data in an hour/half an hour after use pandas mask in Python?
body: <p>I am trying to filter out inner data in my large data frame(1400,000 rows).<br />
  This is a very short and easy version of sample data,</p>
  <pre><code>a      b        c       dt                   e
  35   0.1      234   2020/6/15 14:27:00       0
  1    0.1      554   2020/6/15 15:28:00       1
  2    0.2      654   2020/6/15 16:29:00       0
  23   0.4      2345  2020/6/15 17:26:00       0
  34   0.8      245   2020/6/15 18:25:00       0
  8    0.9      123   2020/6/15 18:26:00       0
  7    0.1      22    2020/6/15 18:27:00       0
  2    0.3      99    2020/6/15 18:28:00       0
  219  0.2      17    2020/6/15 19:26:00       0
  </code></pre>
  <p>The result should look like <code>SQL query</code> as below:</p>
  <pre><code>select * from table where (a &gt; 10 and a &lt; 25) or b &gt; 0.2 or c &gt; 500 and e == 0
  </code></pre>
  <p>So I use <code>mask = (df['a'].lt(25) &amp; df['a'].gt(10)) | df['b'].gt(0.2) | df['c'].gt(500) df[mask] &amp; df['e'].eq(0)</code>, can I keep only one row such as df.c.min() between '2020/6/15 18:00:00' and '2020/6/15 19:00:00', we need the data under that conditon, but there are many dirty data, how to keep the lowest data in an hour or half an hour?</p>