{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11741","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11741/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11741/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11741/events","html_url":"https://github.com/pydata/pandas/issues/11741","id":119983283,"number":11741,"title":"Unexpected behavior with groupby on single-row dataframe?","user":{"login":"dwyatte","id":2512762,"avatar_url":"https://avatars.githubusercontent.com/u/2512762?v=3","gravatar_id":"","url":"https://api.github.com/users/dwyatte","html_url":"https://github.com/dwyatte","followers_url":"https://api.github.com/users/dwyatte/followers","following_url":"https://api.github.com/users/dwyatte/following{/other_user}","gists_url":"https://api.github.com/users/dwyatte/gists{/gist_id}","starred_url":"https://api.github.com/users/dwyatte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwyatte/subscriptions","organizations_url":"https://api.github.com/users/dwyatte/orgs","repos_url":"https://api.github.com/users/dwyatte/repos","events_url":"https://api.github.com/users/dwyatte/events{/privacy}","received_events_url":"https://api.github.com/users/dwyatte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Groupby","name":"Groupby","color":"729FCF"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/36","html_url":"https://github.com/pydata/pandas/milestones/0.18.0","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/36/labels","id":1214851,"number":36,"title":"0.18.0","description":"","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":78,"closed_issues":185,"state":"open","created_at":"2015-07-19T20:18:45Z","updated_at":"2016-01-19T12:35:13Z","due_on":"2016-01-31T05:00:00Z","closed_at":null},"comments":3,"created_at":"2015-12-02T16:37:39Z","updated_at":"2016-01-19T15:50:56Z","closed_at":"2016-01-17T03:43:25Z","body":"Do single-row dataframes (not series) get special treatment in some way? It seems you can do arbitrary groupby operations on them on non-existent columns without errors.\r\n\r\n```\r\ndf1 = pd.DataFrame(np.random.randn(1,4), columns=list('ABCD'))\r\ndf2 = pd.DataFrame(np.random.randn(2,4), columns=list('ABCD'))\r\n\r\nIn [3]: df1.groupby('asdf')\r\nOut[3]: pandas.core.groupby.DataFrameGroupBy object at 0x1139acb10\r\n\r\nIn [4]: df2.groupby('asdf')\r\nKeyError: 'asdf'\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/172894744","html_url":"https://github.com/pydata/pandas/issues/11741#issuecomment-172894744","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11741","id":172894744,"user":{"login":"dwyatte","id":2512762,"avatar_url":"https://avatars.githubusercontent.com/u/2512762?v=3","gravatar_id":"","url":"https://api.github.com/users/dwyatte","html_url":"https://github.com/dwyatte","followers_url":"https://api.github.com/users/dwyatte/followers","following_url":"https://api.github.com/users/dwyatte/following{/other_user}","gists_url":"https://api.github.com/users/dwyatte/gists{/gist_id}","starred_url":"https://api.github.com/users/dwyatte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwyatte/subscriptions","organizations_url":"https://api.github.com/users/dwyatte/orgs","repos_url":"https://api.github.com/users/dwyatte/repos","events_url":"https://api.github.com/users/dwyatte/events{/privacy}","received_events_url":"https://api.github.com/users/dwyatte/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T15:50:56Z","updated_at":"2016-01-19T15:50:56Z","body":"Great, thanks!"}}