{"action":"closed","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/18473","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/18473/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/18473/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/18473/events","html_url":"https://github.com/pandas-dev/pandas/issues/18473","id":276701042,"node_id":"MDU6SXNzdWUyNzY3MDEwNDI=","number":18473,"title":"test needed: groupby(as_index=False, sort=False).aggregate formerly (?) gave unexpected results with a list-like function","user":{"login":"bcdarwin","id":164148,"node_id":"MDQ6VXNlcjE2NDE0OA==","avatar_url":"https://avatars2.githubusercontent.com/u/164148?v=4","gravatar_id":"","url":"https://api.github.com/users/bcdarwin","html_url":"https://github.com/bcdarwin","followers_url":"https://api.github.com/users/bcdarwin/followers","following_url":"https://api.github.com/users/bcdarwin/following{/other_user}","gists_url":"https://api.github.com/users/bcdarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/bcdarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcdarwin/subscriptions","organizations_url":"https://api.github.com/users/bcdarwin/orgs","repos_url":"https://api.github.com/users/bcdarwin/repos","events_url":"https://api.github.com/users/bcdarwin/events{/privacy}","received_events_url":"https://api.github.com/users/bcdarwin/received_events","type":"User","site_admin":false},"labels":[{"id":76811,"node_id":"MDU6TGFiZWw3NjgxMQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":195647922,"node_id":"MDU6TGFiZWwxOTU2NDc5MjI=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Difficulty%20Intermediate","name":"Difficulty Intermediate","color":"fbca04","default":false},{"id":195648009,"node_id":"MDU6TGFiZWwxOTU2NDgwMDk=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Effort%20Low","name":"Effort Low","color":"006b75","default":false},{"id":233160,"node_id":"MDU6TGFiZWwyMzMxNjA=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Groupby","name":"Groupby","color":"729FCF","default":false},{"id":127685,"node_id":"MDU6TGFiZWwxMjc2ODU=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Testing","name":"Testing","color":"C4A000","default":false},{"id":717120670,"node_id":"MDU6TGFiZWw3MTcxMjA2NzA=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/good%20first%20issue","name":"good first issue","color":"0e8a16","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55","html_url":"https://github.com/pandas-dev/pandas/milestone/55","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels","id":3228419,"node_id":"MDk6TWlsZXN0b25lMzIyODQxOQ==","number":55,"title":"0.24.0","description":"","creator":{"login":"jorisvandenbossche","id":1020496,"node_id":"MDQ6VXNlcjEwMjA0OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"open_issues":138,"closed_issues":562,"state":"open","created_at":"2018-03-29T12:00:12Z","updated_at":"2018-08-29T12:32:42Z","due_on":"2018-09-30T07:00:00Z","closed_at":null},"comments":4,"created_at":"2017-11-24T21:31:24Z","updated_at":"2018-08-29T12:32:42Z","closed_at":"2018-08-29T12:32:42Z","author_association":"NONE","body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\ndf = pd.DataFrame({\r\n  'group' : [str(x) for x in range(12)],\r\n  'file'  : [str(x) for x in range(12)]})\r\n#Out[20]: \r\n#   file group\r\n#0     0     0\r\n#1     1     1\r\n#2     2     2\r\n#3     3     3\r\n#4     4     4\r\n#5     5     5\r\n#6     6     6\r\n#7     7     7\r\n#8     8     8\r\n#9     9     9\r\n#10   10    10\r\n#11   11    11\r\ndf.groupby('group', as_index=False, sort=False).aggregate({ 'file' : lambda file : list(file)})\r\n#Out[21]: \r\n#   group  file\r\n#0      0   [0]\r\n#1      1   [1]\r\n#2      2  [10]\r\n#3      3  [11]\r\n#4      4   [2]\r\n#5      5   [3]\r\n#6      6   [4]\r\n#7      7   [5]\r\n#8      8   [6]\r\n#9      9   [7]\r\n#10    10   [8]\r\n#11    11   [9]\r\n```\r\n#### Problem description\r\n\r\nThe aggregate obviously hasn't aggregated the correct thing, but rather seems to have assumed some incorrect sorting of the rows.\r\n\r\n#### Expected Output\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\n\r\n[paste the output of ``pd.show_versions()`` here below this line]\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.6.2.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 4.4.0-87-generic\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_CA.UTF-8\r\nLOCALE: en_CA.UTF-8\r\n\r\npandas: 0.21.0\r\npytest: 3.2.2\r\npip: 9.0.1\r\nsetuptools: 28.8.0\r\nCython: 0.26.1\r\nnumpy: 1.13.3\r\n...\r\n</details>\r\n"}}
{"actor":{"display_login":"jreback"}}