From 10310ceb2da05837a198db6714d658a1e0a32478 Mon Sep 17 00:00:00 2001 From: Kha Date: Sun, 22 May 2022 20:18:14 +0300 Subject: [PATCH] Change deprecated `append` to `concat` (#2114) --- python/prophet/forecaster.py | 2 +- python/prophet/tests/test_prophet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/prophet/forecaster.py b/python/prophet/forecaster.py index 2bb9242..734c360 100644 --- a/python/prophet/forecaster.py +++ b/python/prophet/forecaster.py @@ -893,7 +893,7 @@ class Prophet(object): group_cols = new_comp['col'].unique() if len(group_cols) > 0: new_comp = pd.DataFrame({'col': group_cols, 'component': name}) - components = components.append(new_comp) + components = pd.concat([components, new_comp]) return components def parse_seasonality_args(self, name, arg, auto_disable, default_order): diff --git a/python/prophet/tests/test_prophet.py b/python/prophet/tests/test_prophet.py index 5cd0f37..ede1dff 100644 --- a/python/prophet/tests/test_prophet.py +++ b/python/prophet/tests/test_prophet.py @@ -125,7 +125,7 @@ class TestProphet(TestCase): train1 = DATA.head(N // 2).copy() train2 = DATA.head(N // 2).copy() train2['y'] += 10 - train = train1.append(train2) + train = pd.concat([train1, train2]) future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)}) forecaster = Prophet() forecaster.fit(train)