pydata/pandas — pull request #6996 by sinhrks (2014-04-28 23:44:28+00:00)
Title: BUG: GroupBy.get_group raises ValueError when group key contains NaT

Closes #6992. Made `GroupBy.get_group` works even if the key contains `NaT`.

NOTE: One issue is that `GroupBy.groups` returns incorrect key in numpy 1.6. This seems to be caused by `_convert_grouper` uses `grouper.reindex(axis).values` to return value. This looks doesn't affect to main functionalities, but is there any expected result?

```
import pandas as pd
import numpy as np
>>> np.__version__
1.6.2

>>> df = pd.DataFrame({'values': np.random.randn(8),
'dt': [np.nan, pd.Timestamp('2013-01-01'), np.nan, pd.Timestamp('2013-02-01'),
np.nan, pd.Timestamp('2013-02-01'), np.nan, pd.Timestamp('2013-01-01')]})
>>> grouped = df.groupby('dt')

>>> grouped.groups
{1970-01-16 48:00:00: [1, 7], 1970-01-16 24:00:00: [3, 5]}
```