{"action":"opened","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/21668","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21668/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21668/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21668/events","html_url":"https://github.com/pandas-dev/pandas/issues/21668","id":336814366,"node_id":"MDU6SXNzdWUzMzY4MTQzNjY=","number":21668,"title":"GroupBy any/all Fails with Duplicate Column Names","user":{"login":"WillAyd","id":609873,"node_id":"MDQ6VXNlcjYwOTg3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/609873?v=4","gravatar_id":"","url":"https://api.github.com/users/WillAyd","html_url":"https://github.com/WillAyd","followers_url":"https://api.github.com/users/WillAyd/followers","following_url":"https://api.github.com/users/WillAyd/following{/other_user}","gists_url":"https://api.github.com/users/WillAyd/gists{/gist_id}","starred_url":"https://api.github.com/users/WillAyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillAyd/subscriptions","organizations_url":"https://api.github.com/users/WillAyd/orgs","repos_url":"https://api.github.com/users/WillAyd/repos","events_url":"https://api.github.com/users/WillAyd/events{/privacy}","received_events_url":"https://api.github.com/users/WillAyd/received_events","type":"User","site_admin":false},"labels":[{"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":233160,"node_id":"MDU6TGFiZWwyMzMxNjA=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Groupby","name":"Groupby","color":"729FCF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-28T23:33:24Z","updated_at":"2018-06-28T23:33:24Z","closed_at":null,"author_association":"MEMBER","body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\n>>> df = pd.DataFrame([[True, True, True]], columns=['key', 'a', 'a'])\r\n>>> df.groupby('key').any()\r\n\r\nValueError: Buffer has wrong number of dimensions (expected 1, got 2)\r\n```\r\n#### Problem description\r\n\r\nThis throws because of the below line:\r\n\r\nhttps://github.com/pandas-dev/pandas/blob/0801b8c9090752c1342962aecd03e9a0468adbd4/pandas/core/groupby/groupby.py#L2024\r\n\r\nCython is expecting a one dimensional array of masks, but `self._iterate_slices()` which contains the above statement will provide a multi-dimensional array. Therefore, when the Cython function gets called with `mask` it is a multi-dimensional object and causes the `ValueError`.\r\n\r\nI'm not sure if this is the expected behavior of `self._iterate_slices()` or not. If so, there may be implications in other parts of the module.\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\n\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: 0801b8c9090752c1342962aecd03e9a0468adbd4\r\npython: 3.6.4.final.0\r\npython-bits: 64\r\nOS: Darwin\r\nOS-release: 17.6.0\r\nmachine: x86_64\r\nprocessor: i386\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\nLOCALE: en_US.UTF-8\r\n\r\npandas: 0.24.0.dev0+184.g0801b8c90\r\npytest: 3.4.1\r\npip: 10.0.1\r\nsetuptools: 38.5.1\r\nCython: 0.27.3\r\nnumpy: 1.14.1\r\nscipy: 1.0.0\r\npyarrow: 0.8.0\r\nxarray: 0.10.0\r\nIPython: 6.2.1\r\nsphinx: 1.7.0\r\npatsy: 0.5.0\r\ndateutil: 2.6.1\r\npytz: 2018.3\r\nblosc: None\r\nbottleneck: 1.2.1\r\ntables: 3.4.2\r\nnumexpr: 2.6.4\r\nfeather: 0.4.0\r\nmatplotlib: 2.1.2\r\nopenpyxl: 2.5.0\r\nxlrd: 1.1.0\r\nxlwt: 1.3.0\r\nxlsxwriter: 1.0.2\r\nlxml: 4.1.1\r\nbs4: 4.6.0\r\nhtml5lib: 1.0.1\r\nsqlalchemy: 1.2.5\r\npymysql: 0.8.0\r\npsycopg2: 2.7.4 (dt dec pq3 ext lo64)\r\njinja2: 2.10\r\ns3fs: 0.1.3\r\nfastparquet: 0.1.4\r\npandas_gbq: 0.4.1\r\npandas_datareader: None\r\ngcsfs: None\r\n\r\n</details>\r\n"}}
{"actor":{"display_login":"WillAyd"}}