Skip to content

Add None as possible parameter value to isnull/isna/notnull/notna #325

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
Sep 22, 2022

Conversation

gandhis1
Copy link
Contributor

@gandhis1 gandhis1 marked this pull request as ready for review September 22, 2022 03:22
@marctorsoc
Copy link

I wrote exactly the same changes as you and was going to create a PR when I saw this 🤣 good job!

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 @gandhis1

@Dr-Irv Dr-Irv merged commit 10b87cd into pandas-dev:main Sep 22, 2022
@gandhis1 gandhis1 deleted the isnull branch September 22, 2022 21:52
@gandhis1
Copy link
Contributor Author

One additional thought here - is there any way we can make these functions a TypeGuard so they can be used to narrow types? Right now it will not narrow an Optional or a Union[np.nan, T], but it should.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Sep 27, 2022

One additional thought here - is there any way we can make these functions a TypeGuard so they can be used to narrow types? Right now it will not narrow an Optional or a Union[np.nan, T], but it should.

Open to a PR that does this. Would have to import TypeGuard from typing_extensions

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.

pd.isna / pd.isnull raising mypy error for None
3 participants