{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/6996","labels_url":"https://api.github.com/repos/pydata/pandas/issues/6996/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/6996/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/6996/events","html_url":"https://github.com/pydata/pandas/pull/6996","id":32409029,"number":6996,"title":"BUG: GroupBy.get_group raises ValueError when group key contains NaT","user":{"login":"sinhrks","id":1696302,"avatar_url":"https://avatars.githubusercontent.com/u/1696302?v=3","gravatar_id":"","url":"https://api.github.com/users/sinhrks","html_url":"https://github.com/sinhrks","followers_url":"https://api.github.com/users/sinhrks/followers","following_url":"https://api.github.com/users/sinhrks/following{/other_user}","gists_url":"https://api.github.com/users/sinhrks/gists{/gist_id}","starred_url":"https://api.github.com/users/sinhrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinhrks/subscriptions","organizations_url":"https://api.github.com/users/sinhrks/orgs","repos_url":"https://api.github.com/users/sinhrks/repos","events_url":"https://api.github.com/users/sinhrks/events{/privacy}","received_events_url":"https://api.github.com/users/sinhrks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Groupby","name":"Groupby","color":"729FCF"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Missing-data","name":"Missing-data","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/25","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/25/labels","id":569113,"number":25,"title":"0.16.0","description":"after 0.15 of course!","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":884,"closed_issues":144,"state":"open","created_at":"2014-02-14T03:31:22Z","updated_at":"2015-01-13T11:00:04Z","due_on":"2015-02-28T08:00:00Z","closed_at":null},"comments":25,"created_at":"2014-04-28T23:44:28Z","updated_at":"2015-01-13T11:01:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/6996","html_url":"https://github.com/pydata/pandas/pull/6996","diff_url":"https://github.com/pydata/pandas/pull/6996.diff","patch_url":"https://github.com/pydata/pandas/pull/6996.patch"},"body":"Closes #6992. Made `GroupBy.get_group` works even if the key contains `NaT`.\r\n\r\nNOTE: 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?\r\n\r\n```\r\nimport pandas as pd\r\nimport numpy as np\r\n>>> np.__version__\r\n1.6.2\r\n\r\n>>> df = pd.DataFrame({'values': np.random.randn(8), \r\n                   'dt': [np.nan, pd.Timestamp('2013-01-01'), np.nan, pd.Timestamp('2013-02-01'),\r\n                          np.nan, pd.Timestamp('2013-02-01'), np.nan, pd.Timestamp('2013-01-01')]})\r\n>>> grouped = df.groupby('dt')\r\n\r\n>>> grouped.groups\r\n{1970-01-16 48:00:00: [1, 7], 1970-01-16 24:00:00: [3, 5]}\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/69728193","html_url":"https://github.com/pydata/pandas/pull/6996#issuecomment-69728193","issue_url":"https://api.github.com/repos/pydata/pandas/issues/6996","id":69728193,"user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T11:01:16Z","updated_at":"2015-01-13T11:01:16Z","body":"@sinhrks can we revive this? and pls add a tests for #9236 "}}