-
-
Notifications
You must be signed in to change notification settings - Fork 141
type dataframe.replace #1129
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
type dataframe.replace #1129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from removing the deprecated limit
and method
arguments, can you make what is in series.pyi
for Series.replace()
have arguments that correspond (and tests)?
pandas-stubs/core/frame.pyi
Outdated
) = ..., | ||
value: ( | ||
Scalar | NAType | Sequence[Scalar] | Mapping[Hashable, Scalar] | None | ||
) = ..., | ||
*, | ||
inplace: Literal[True], | ||
limit: int | None = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
limit
is deprecated, so we should remove it.
pandas-stubs/core/frame.pyi
Outdated
| Pattern | ||
| Sequence[str | Pattern] | ||
| Mapping[Hashable, str | Pattern] | ||
) = ..., | ||
method: ReplaceMethod = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method
is deprecated so we should remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcoGorelli this looks good to me. I'll merge it in when you change it from draft status. Ping me when that is done.
Thanks @Dr-Irv ! It was doing my head in trying to cover all the possibilities in all arguments so I made an alias |
Yes. Let me know when it's ready for review |
Ready for review, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @MarcoGorelli
assert_type()
to assert the type of any return value