{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/17343","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/17343/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/17343/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/17343/events","html_url":"https://github.com/pandas-dev/pandas/pull/17343","id":253068055,"number":17343,"title":"BUG: when Index is numeric and indexer is boolean (#16877)","user":{"login":"andrejonasson","id":22002741,"avatar_url":"https://avatars3.githubusercontent.com/u/22002741?v=4","gravatar_id":"","url":"https://api.github.com/users/andrejonasson","html_url":"https://github.com/andrejonasson","followers_url":"https://api.github.com/users/andrejonasson/followers","following_url":"https://api.github.com/users/andrejonasson/following{/other_user}","gists_url":"https://api.github.com/users/andrejonasson/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejonasson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejonasson/subscriptions","organizations_url":"https://api.github.com/users/andrejonasson/orgs","repos_url":"https://api.github.com/users/andrejonasson/repos","events_url":"https://api.github.com/users/andrejonasson/events{/privacy}","received_events_url":"https://api.github.com/users/andrejonasson/received_events","type":"User","site_admin":false},"labels":[{"id":76811,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":2822098,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Indexing","name":"Indexing","color":"0b02e1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2017-08-26T06:38:29Z","updated_at":"2017-09-18T18:46:32Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/17343","html_url":"https://github.com/pandas-dev/pandas/pull/17343","diff_url":"https://github.com/pandas-dev/pandas/pull/17343.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/17343.patch"},"body":"- [ X ] closes #16877 \r\n- [ X ] tests added / passed\r\n- [ X ] passes `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n- [ X ] whatsnew entry\r\n\r\nThis warns for both tickets:\r\nhttps://github.com/pandas-dev/pandas/issues/6189\r\nhttps://github.com/pandas-dev/pandas/issues/16877\r\n\r\nThere's one particular flaw: non-unique indices never run get_indexer and deals with dropping in a way where it is difficult to inspect types. I think it should be OK to leave that one for now though.\r\n\r\nOne of the reasons I chose to warn instead of Error is that running some_numeric_index.difference([True, False]) should possibly still be allowed, while still warning the user that the difference they are getting may just be due to conversion from True to 1 (or 1.0) and False to 0 (or 0.0). This probably is rare enough that an Error might still be the best approach.\r\n\r\nThe questions remaining to me are:\r\nIs this severe enough that an Error should be raised? What type in this case?\r\nIs the message sufficient?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/330319396","html_url":"https://github.com/pandas-dev/pandas/pull/17343#issuecomment-330319396","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/17343","id":330319396,"user":{"login":"gfyoung","id":9273653,"avatar_url":"https://avatars0.githubusercontent.com/u/9273653?v=4","gravatar_id":"","url":"https://api.github.com/users/gfyoung","html_url":"https://github.com/gfyoung","followers_url":"https://api.github.com/users/gfyoung/followers","following_url":"https://api.github.com/users/gfyoung/following{/other_user}","gists_url":"https://api.github.com/users/gfyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/gfyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfyoung/subscriptions","organizations_url":"https://api.github.com/users/gfyoung/orgs","repos_url":"https://api.github.com/users/gfyoung/repos","events_url":"https://api.github.com/users/gfyoung/events{/privacy}","received_events_url":"https://api.github.com/users/gfyoung/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T18:46:32Z","updated_at":"2017-09-18T18:46:32Z","author_association":"MEMBER","body":"> Also is there some way to make sure I don't get merge conflicts due to the whatsnew line I've added\r\n\r\nReally not much you can do here.  People will modify the `whatsnew` in other PR's, causing the merge conflicts to occur.  Just remain diligent to resolve them when they pop up."}}
{"actor":{"display_login":"gfyoung"}}