Skip to content

DOC: cleanup whatsnew entry for na_action='ignore' #52355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 4, 2023

Conversation

topper-123
Copy link
Contributor

No description provided.


Frequently, it is not desirable to apply the callable to nan-like values of the array and to avoid doing
that, the ``map`` method could be called with ``na_action="ignore"``, e.g. like this: ``ser.map(func, na_action="ignore")``.
However, ``na_action="ignore"`` was not implemented for many ``ExtensionArray`` and ``Index`` types
Copy link
Member

@mroeschke mroeschke Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you note specifically which types na_action is now consistently respected? (the datetime likes and period)?

I made a new version. I think its difficult to explain what didn't work correctly succintly. There were some patterns that worked correctly, other failed, while other gave a wrong result for the same ExtensionArray (e.g. the Categorical example below).

In short, .map could behave very erratic 😄.

@mroeschke mroeschke added the Docs label Apr 3, 2023
@topper-123
Copy link
Contributor Author

I’ve updated.

@mroeschke mroeschke added this to the 2.1 milestone Apr 4, 2023
@mroeschke mroeschke merged commit d86d842 into pandas-dev:main Apr 4, 2023
@mroeschke
Copy link
Member

Thanks @topper-123

@topper-123 topper-123 deleted the clean_map_na_ignore_whatsnew branch April 4, 2023 00:37
topper-123 added a commit to topper-123/pandas that referenced this pull request Apr 6, 2023
* DOC: cleanup whatsnew entry for na_action='ignore'

* Update doc/source/whatsnew/v2.1.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* Update doc/source/whatsnew/v2.1.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* Update doc/source/whatsnew/v2.1.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* Update doc/source/whatsnew/v2.1.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* update comment

---------

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants