Skip to content

Series mask method's "other" parameter does not accept pandas.NA #725

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 3 commits into from
Jun 7, 2023

Conversation

ABizzinotto
Copy link
Contributor

s = pd.Series([1, 2, 3, 4, 5])

# Test case with a boolean condition and a scalar value
check(assert_type(s.mask(s > 3, 10), pd.Series), pd.Series, np.int64)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should use np.integer here (and below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

thanks @ABizzinotto

@Dr-Irv Dr-Irv merged commit d72d9f1 into pandas-dev:main Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Series mask method's "other" parameter does not accept pandas.NA
2 participants