-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Broaden dict
to Mapping
as replace argument
#61440
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
Comments
Hey @DavideCanton, Have you installed the See below, the type is |
This is what I do
|
I see why you are seeing the issue and I don't, can you try running with |
Seems fixed if using the main version, so probably as you said it's just a stubs problem. Thanks! |
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Currently the
replace
method ofSeries
allows onlydict
, but notMapping
inputs, as theDataFrame
one does.For example:
Feature Description
I guess it's enough to change from
dict
toMapping
in the type signature, since it seems to work even if the argument is not a dict (for example if it's aMappingProxyType
instance).Alternative Solutions
I guess an alternative solution is just to type ignore the replace invocation.
Additional Context
No response
The text was updated successfully, but these errors were encountered: