Skip to content
Prev Previous commit
Next Next commit
Include invalid order value in exception
  • Loading branch information
nmusolino committed Feb 10, 2019
commit c4f3b6df12d91bbacc15938423d03e69b867a3b7
3 changes: 2 additions & 1 deletion pandas/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None,
elif method == 'spline':
# GH #10633, #24014
if order is None or (order <= 0):
raise ValueError("order needs to be specified and greater than 0")
raise ValueError("order needs to be specified and greater than 0; "
"got order: {}".format(order))
terp = interpolate.UnivariateSpline(x, y, k=order, **kwargs)
new_y = terp(new_x)
else:
Expand Down