use ffill in forecasting example

This commit is contained in:
Chi Wang
2022-03-31 18:06:24 +00:00
parent 84f1ae7424
commit e877de6414
3 changed files with 6 additions and 7 deletions

View File

@@ -8,7 +8,8 @@ def test_forecast_automl(budget=5):
data = sm.datasets.co2.load_pandas().data["co2"].resample("MS").mean()
data = (
data.fillna(data.bfill())
data.bfill()
.ffill()
.to_frame()
.reset_index()
.rename(columns={"index": "ds", "co2": "y"})