title: pandas GroupBy columns with NaN (missing) values
body: <p>I have a DataFrame with many missing values in columns which I wish to groupby:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  df = pd.DataFrame({'a': ['1', '2', '3'], 'b': ['4', np.NaN, '6']})
  
  In [4]: df.groupby('b').groups
  Out[4]: {'4': [0], '6': [2]}
  </code></pre>
  
  <p>see that Pandas has dropped the rows with NaN target values. (I want to include these rows!)</p>
  
  <p><em>Since I need many such operations (many cols have missing values), and use more complicated functions than just medians (typically random forests), I want to avoid writing too complicated pieces of code.</em></p>
  
  <p>Any suggestions? Should I write a function for this or is there a simple solution?</p>