{"id":2788,"library":"statsforecast","title":"StatsForecast","description":"StatsForecast is a Python library providing a lightning-fast suite of statistical and econometric models for time series forecasting. It offers highly optimized implementations of models like ARIMA, ETS, CES, and Theta, designed for speed and scalability to forecast millions of series efficiently. The library is currently at version 2.0.3 and maintains an active release cadence with frequent updates and performance enhancements.","status":"active","version":"2.0.3","language":"en","source_language":"en","source_url":"https://github.com/Nixtla/statsforecast/","tags":["time series","forecasting","statistical models","machine learning","ARIMA","ETS","scalability","fast"],"install":[{"cmd":"pip install statsforecast","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Requires Python 3.9 or higher.","package":"python","optional":false},{"reason":"Pinned in v2.0.2 for compatibility, likely a core dependency for some models.","package":"statsmodels","optional":false},{"reason":"Pinned in v2.0.2 for compatibility, likely a core dependency for some models.","package":"scipy","optional":false}],"imports":[{"symbol":"StatsForecast","correct":"from statsforecast import StatsForecast"},{"symbol":"AutoARIMA","correct":"from statsforecast.models import AutoARIMA"},{"note":"AirPassengersDF is a utility dataset moved to `statsforecast.utils`.","wrong":"from statsforecast.core import AirPassengersDF","symbol":"AirPassengersDF","correct":"from statsforecast.utils import AirPassengersDF"}],"quickstart":{"code":"import pandas as pd\nfrom statsforecast import StatsForecast\nfrom statsforecast.models import AutoARIMA\nfrom statsforecast.utils import AirPassengersDF\n\n# Load example data (AirPassengers dataset)\ndf = AirPassengersDF\n\n# Instantiate StatsForecast with models and frequency\n# For monthly data, 'M' or 'ME' (MonthEnd) is common\nsf = StatsForecast(\n    models=[AutoARIMA(season_length=12)],\n    freq='M',\n    n_jobs=-1 # Use all available cores for parallel processing\n)\n\n# Fit the models\nsf.fit(df)\n\n# Make predictions for the next 12 steps (horizon=12)\n# and calculate 95% prediction intervals\nforecast_df = sf.predict(h=12, level=[95])\n\nprint(forecast_df.head())","lang":"python","description":"This quickstart demonstrates how to use StatsForecast to fit an AutoARIMA model to the classic AirPassengers dataset and generate future predictions with confidence intervals. The input DataFrame must be in a 'long' format with 'unique_id', 'ds' (datestamp), and 'y' (target) columns."},"warnings":[{"fix":"Explicitly set `allowmean=False` and/or `allowdrift=False` in `AutoARIMA` constructor if you need the old behavior, or review your models to account for the new defaults.","message":"The default values for `allowmean` and `allowdrift` in `AutoARIMA` changed from `False` to `True` in `v2.0.0`. This can alter the behavior and results of your `AutoARIMA` forecasts if you were relying on the previous defaults.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Remove the `df` argument from the `StatsForecast()` constructor. Pass your DataFrame directly to methods like `sf.fit(df)` or `sf.forecast(df=df, h=...)`.","message":"The `df` argument has been removed from the `StatsForecast` class constructor as of `v2.0.3`. Instead, the DataFrame should be passed directly to the `fit`, `forecast`, or `cross_validation` methods.","severity":"breaking","affected_versions":">=2.0.3"},{"fix":"Replace `freq='H'` with `freq='h'` when defining the frequency in `StatsForecast` or other pandas-related operations.","message":"Pandas frequency alias 'H' (for hourly data) is deprecated and will be removed in a future version. Use 'h' instead.","severity":"deprecated","affected_versions":">=2.0.2"},{"fix":"Consult the official release notes for v2.0.0 and update code using features that were marked as deprecated in earlier versions.","message":"Version 2.0.0 included a general breaking change to 'remove deprecated behavior' as part of refactoring. While specific impacts vary, it signals that code using previously deprecated features will likely break.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}