{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/24275","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24275/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24275/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24275/events","html_url":"https://github.com/pandas-dev/pandas/pull/24275","id":390867033,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NTM3ODM1","number":24275,"title":"GH24241 make Categorical.map transform nans","user":{"login":"JustinZhengBC","id":29615021,"node_id":"MDQ6VXNlcjI5NjE1MDIx","avatar_url":"https://avatars1.githubusercontent.com/u/29615021?v=4","gravatar_id":"","url":"https://api.github.com/users/JustinZhengBC","html_url":"https://github.com/JustinZhengBC","followers_url":"https://api.github.com/users/JustinZhengBC/followers","following_url":"https://api.github.com/users/JustinZhengBC/following{/other_user}","gists_url":"https://api.github.com/users/JustinZhengBC/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinZhengBC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinZhengBC/subscriptions","organizations_url":"https://api.github.com/users/JustinZhengBC/orgs","repos_url":"https://api.github.com/users/JustinZhengBC/repos","events_url":"https://api.github.com/users/JustinZhengBC/events{/privacy}","received_events_url":"https://api.github.com/users/JustinZhengBC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-13T21:27:36Z","updated_at":"2018-12-13T22:02:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/24275","html_url":"https://github.com/pandas-dev/pandas/pull/24275","diff_url":"https://github.com/pandas-dev/pandas/pull/24275.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/24275.patch"},"body":"- [ ] closes #24241\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\nAlters `Categorical.map` so that the mapper function is also applied to NaN values. The mentioned bug report brings up the example of calling `apply(pd.isna)` on a categorical series, arguing that the values and dtype of the returned list should be consistent with non-categorical series. This PR makes the values consistent. The discrepancies in dtypes are present in categorical series without NaN's and consistent with documentation."},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/447136519","html_url":"https://github.com/pandas-dev/pandas/pull/24275#issuecomment-447136519","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24275","id":447136519,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzEzNjUxOQ==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-12-13T22:02:20Z","updated_at":"2018-12-13T22:02:20Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=h1) Report\n> Merging [#24275](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/31a351258ad36392a8251c195f7e0869b90c7467?src=pr&el=desc) will **decrease** coverage by `<.01%`.\n> The diff coverage is `100%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24275/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=tree)\n\n```diff\n@@            Coverage Diff             @@\n##           master   #24275      +/-   ##\n==========================================\n- Coverage   92.22%   92.22%   -0.01%     \n==========================================\n  Files         162      162              \n  Lines       51787    51798      +11     \n==========================================\n+ Hits        47761    47771      +10     \n- Misses       4026     4027       +1\n```\n\n| Flag | Coverage Δ | |\n|---|---|---|\n| #multiple | `90.62% <100%> (ø)` | :arrow_up: |\n| #single | `42.99% <0%> (-0.02%)` | :arrow_down: |\n\n| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/24275/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.37% <100%> (+0.06%)` | :arrow_up: |\n| [pandas/io/json/json.py](https://codecov.io/gh/pandas-dev/pandas/pull/24275/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vanNvbi5weQ==) | `92.61% <0%> (-0.48%)` | :arrow_down: |\n| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24275/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.51% <0%> (+0.09%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=footer). Last update [31a3512...d765dc3](https://codecov.io/gh/pandas-dev/pandas/pull/24275?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}