Skip to content

BUG: map(na_action=ignore) not respected for Arrow & masked types #57388

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 1 commit into from
Feb 14, 2024

Conversation

mroeschke
Copy link
Member

In [5]: df = DataFrame({"a": [1, NA, 2], "b": [NA, 4, NA]}, dtype="Int64")

In [6]: df.map(lambda x: 42, na_action="ignore") # pd.NA's lost
Out[6]: 
    a   b
0  42  42
1  42  42
2  42  42

@mroeschke mroeschke added NA - MaskedArrays Related to pd.NA and nullable extension arrays Arrow pyarrow functionality labels Feb 13, 2024
@mroeschke mroeschke added this to the 2.2.1 milestone Feb 13, 2024
@phofl phofl merged commit 3caf55f into pandas-dev:main Feb 14, 2024
@phofl
Copy link
Member

phofl commented Feb 14, 2024

thx @mroeschke

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Feb 14, 2024
@mroeschke mroeschke deleted the bug/map/na_action branch February 14, 2024 02:11
mroeschke added a commit that referenced this pull request Feb 14, 2024
…spected for Arrow & masked types) (#57413)

Backport PR #57388: BUG: map(na_action=ignore) not respected for Arrow & masked types

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality NA - MaskedArrays Related to pd.NA and nullable extension arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants