-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: interpolate raising if fill_value is given #54927
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
Conversation
|
||
def test_interpolate_fill_value(self): | ||
# GH#54920 | ||
ser = Series([np.nan, 0, 1, np.nan, 3, np.nan]) |
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.
Needs a pytest.importorskip("scipy")
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.
Thx
@@ -8180,7 +8180,7 @@ def interpolate( | |||
stacklevel=find_stack_level(), | |||
) | |||
|
|||
if "fill_value" in kwargs: | |||
if method in fillna_methods and "fill_value" in kwargs: |
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.
@phofl Would it make sense to adapt the Error message below to mention that fill_value is not valid for the fillna-methods?
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.
Yeah I updated the message
Is this a good time to remove the keyword from EA.interpolate? |
# Conflicts: # doc/source/whatsnew/v2.1.1.rst
There is not a straightforward equivalent for no fill_value, but not a string opinion |
Thanks @phofl |
…_value is given) (#55017) Backport PR #54927: REGR: interpolate raising if fill_value is given Co-authored-by: Patrick Hoefler <[email protected]>
* REGR: interpolate raising if fill_value is given * Update test and message * Update pandas/core/generic.py --------- Co-authored-by: Matthew Roeschke <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.