From bd0979244d3a0becef2b9b4e4ac53f42e3939373 Mon Sep 17 00:00:00 2001 From: Gabriel Linder Date: Fri, 15 Feb 2019 19:28:51 +0100 Subject: [PATCH] Fix FutureWarning from Pandas 0.24.0. (#830) * Fix FutureWarning from Pandas 0.24.0. Signed-off-by: Gabriel Linder * Stay compatible with older versions of pandas. Signed-off-by: Gabriel Linder --- python/fbprophet/forecaster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index bfe8f40..6efbcd9 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -877,7 +877,7 @@ class Prophet(object): first = self.history['ds'].min() last = self.history['ds'].max() dt = self.history['ds'].diff() - min_dt = dt.iloc[dt.nonzero()[0]].min() + min_dt = dt.iloc[dt.values.nonzero()[0]].min() # Yearly seasonality yearly_disable = last - first < pd.Timedelta(days=730)