title: How to count nulls in a group rowwise in pandas DataFrame
body: <p>According to this topic <code>https://stackoverflow.com/questions/19384532/how-to-count-number-of-rows-per-group-and-other-statistics-in-pandas-group-by</code> I'd like to add one more stat - count null values (a.k.a. NaN) in DataFrame:</p>
  
  <pre><code>tdf = pd.DataFrame(columns = ['indicator', 'v1', 'v2', 'v3', 'v4'], 
                     data = [['A', '3', pd.np.nan, '4', pd.np.nan ],
                             ['A', '3', '4', '4', pd.np.nan ],
                             ['B', pd.np.nan, pd.np.nan, pd.np.nan, pd.np.nan],
                             ['B', '1', None, pd.np.nan, None ],
                             ['C', '9', '7', '4', '0']])
  </code></pre>
  
  <p>I'd like to use something like this:</p>
  
  <p><code>tdf.groupby('indicator').agg({'indicator': ['count']})</code></p>
  
  <p>but with the addition of nulls counter to have it in separate column, like:</p>
  
  <p><code>tdf.groupby('indicator').agg({'indicator': ['count', 'isnull']})</code></p>
  
  <p>Now, I get error: <code>AttributeError: Cannot access callable attribute 'isnull' of 'SeriesGroupBy' objects, try using the 'apply' method</code> </p>
  
  <p>How can I access this <code>pd.isnull()</code> function here or use some with its functionality?</p>
  
  <p>Expected output would be:</p>
  
  <pre><code>          indicator      nulls
                count      count
  indicator          
  A                 2          3
  B                 2          7
  C                 1          0
  </code></pre>
  
  <p>Note that <code>pd.np.nan</code> works as <code>None</code> in the same way.</p>