title: Conditional groupby in python
body: <p>I'm working with a dataframe called <code>Ozon</code>. It has a column called <code>O3</code> and a DatetimeIndex. Now I created a new dataframe so that I would get the mean ozon values for each day:</p>
  <pre><code>dailymeanozon = ozon.groupby(pd.Grouper(freq='1D')).mean()
  </code></pre>
  <p>This works fine, however for some days, the amount of (correct) ozon measurements is really small. So for some days, the daily mean ozon value isn't representative for the entire day. Therefore I want the <code>groupby</code> function to exclude days that have less than X amount of values. Or what may also work: to exclude the day if it has to many NaN values.</p>
  <p>It seems like a simple question, but I'm quite new to python so I couldn't figure it out. So all help is very much appreciated!</p>