-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pd.Series.interpolate(method='spline') Errort Msg, #10633 #10800
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
@@ -1718,6 +1718,9 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None, | |||
bounds_error=bounds_error) | |||
new_y = terp(new_x) | |||
elif method == 'spline': | |||
# GH #10633: first attempt | |||
if k is None: | |||
raise AssertionError("order needs to be specified, use 1, 2, or 3") |
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.
use a ValueError
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 :)
ᐧ
On Thu, Aug 13, 2015 at 12:33 PM, Jeff Reback notifications@github.com
wrote:
In pandas/core/common.py
#10800 (comment):@@ -1718,6 +1718,9 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None,
bounds_error=bounds_error)
new_y = terp(new_x)
elif method == 'spline':
# GH #10633: first attempt
if k is None:
raise AssertionError("order needs to be specified, use 1, 2, or 3")
use a ValueError
—
Reply to this email directly or view it on GitHub
https://github.com/pydata/pandas/pull/10800/files#r36960558.
Peadar Coyle
Skype: springcoilarch
www.twitter.com/springcoil
peadarcoyle.wordpress.com
Look like I need to add a test for k - or something or am i wrong? |
I think that's ready to be merged :) |
needs a test |
Done :) |
@@ -1718,6 +1718,9 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None, | |||
bounds_error=bounds_error) | |||
new_y = terp(new_x) | |||
elif method == 'spline': | |||
# GH #10633: first attempt |
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.
remove the 'first attempt' comment
pls add a whatsnew note in bug fixes |
I added a work through etc - maybe it needs an error message (another PR) for order=0 or order>=6 |
s = Series(np.arange(10)**2) | ||
s[np.random.randint(0,9,3)] = np.nan | ||
result1 = s.interpolate(method='spline', order=1) | ||
expected1 = s.interpolate(method='spline', order=1) |
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.
what does this test?
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.
I think my test needs some work. You're right.
I'll remove that test.
Updating on the basis of your feedback. |
I assume this one will be ok for the 0.17 release right? |
ok, pls rebase and squash. ping on green. |
6bff824
to
022645e
Compare
update legacy_storage for pickles update pickles/msgpack for 0.16.2 Added tests for ABC Types, Issue pandas-dev#10828 TST: pandas-dev#10822, skip tests on windows for odd error message in to_datetime with unicode COMPAT:Allow multi-indexes to be written to excel. (Even though they cannot be read back in.) Closes pandas-dev#10564 DOC: typo A few changes in docs
update legacy_storage for pickles update pickles/msgpack for 0.16.2 Added tests for ABC Types, Issue pandas-dev#10828 TST: pandas-dev#10822, skip tests on windows for odd error message in to_datetime with unicode COMPAT:Allow multi-indexes to be written to excel. (Even though they cannot be read back in.) Closes pandas-dev#10564 DOC: typo ENH: pickle support for Period pandas-dev#10439 update legacy_storage for pickles update pickles/msgpack for 0.16.2 Added tests for ABC Types, Issue pandas-dev#10828 TST: pandas-dev#10822, skip tests on windows for odd error message in to_datetime with unicode COMPAT:Allow multi-indexes to be written to excel. (Even though they cannot be read back in.) Closes pandas-dev#10564 DOC: typo A few changes in docs
Looks like this one got messed up a bit - do you have any suggestions on how to fix this? |
Actually this seems to not be running through travis. I think I pushed to the wrong location. I'll fix it later. |
If you do
everything should be fine |
Upstream should be my form right? Or the pandas original one? On Fri, Aug 21, 2015 at 1:17 PM, Joris Van den Bossche <
Peadar Coyle |
upstream should be 'pydata/pandas', origin is 'springcoil/pandas' You can check this with |
Cool thanks for that reminder. On Fri, Aug 21, 2015 at 1:23 PM, Joris Van den Bossche <
Peadar Coyle |
Thanks @jorisvandenbossche |
replaced by #10880 normally don't open a new PR as you can simply replace all of the commits. but ok for now. |
Accidentally done On Friday, 21 August 2015, Jeff Reback notifications@github.com wrote:
Peadar Coyle |
Closes #10633
This a first attempt at the error messages mentioned. Not ready to merge yet but I wanted to start the conversation...
I think I might have the error message wrong - anyone got any ideas.