From 969dce8693d3116c73dbabdc38fe5bd0aca4578e Mon Sep 17 00:00:00 2001 From: Damian Kula Date: Wed, 30 Jan 2019 18:40:29 +0100 Subject: [PATCH] Makes example from docstring work The scipy's polynomial interpolate method does not accept even order number. With odd order number the example will actually work. --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index a351233a77465..cff685c2ad7cb 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6601,7 +6601,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None, 'barycentric', 'polynomial': Passed to `scipy.interpolate.interp1d`. Both 'polynomial' and 'spline' require that you also specify an `order` (int), - e.g. ``df.interpolate(method='polynomial', order=4)``. + e.g. ``df.interpolate(method='polynomial', order=5)``. These use the numerical values of the index. * 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima': Wrappers around the SciPy interpolation methods of similar