Pandas aggregate for counting with nans
<p>The pandas count aggregate ignores nan's. I need a count that includes them. Numpy has aggregates for some but not all nan modified aggregates, do I have to use a custom aggregate or is there a way doing this that I can't find?</p>

<p>This is for groupby's, and I want the normal NaN functionality for mean, but weird for count. In code</p>

<pre><code>In [1]: import numpy

In [2]: import pandas as pd

In [3]: df = pd.DataFrame([[0,float('nan')],[0,float('nan')],[0,float('nan')]])

In [4]: df.groupby(0).agg(['count', 'mean'])
Out[4]:
      1
  count mean
0
0     0  NaN
</code></pre>

<p>I want the output to be 3 Nan instead of 0 NaN.</p>