datasetsforecast
Datasets for Time series forecasting
What it is and what it does
datasetsforecast is a data-loading library that provides programmatic access to standard time-series forecasting benchmarks. It wraps several well-known datasets (Favorita, M3, M4, M5, Hierarchical, Longhorizon, PHM2008) and handles remote fetching and local caching, so you can load them into pandas DataFrames with a single function call. Each dataset module exposes a `load()` method that accepts a local directory and a group identifier, returning train and test splits ready for model evaluation.
The package is designed for researchers and practitioners building and benchmarking forecasting models. It depends on numpy, pandas, scikit-learn, requests, aiohttp, tqdm, xlrd, and utilsforecast—all widely used libraries. The project is actively maintained, supports Python 3.10 through 3.14, and carries a permissive MIT license. It is marked Pre-Alpha, meaning the API may change, but it has been in use since 2022 and receives regular updates.
Use it for:
- Benchmark a new forecasting model against standard datasets like M4 or M5 without manual download and preprocessing.
- Build hierarchical forecasting pipelines using the Hierarchical dataset to test reconciliation methods.
- Evaluate retail demand forecasting on Favorita data for supply-chain optimization projects.
- Compare long-horizon forecasting approaches using the Longhorizon dataset.
- Prototype prognostics and health management models with PHM2008 industrial sensor data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Downloads and loads curated time-series forecasting datasets (Favorita, M3, M4, M5, Hierarchical, Longhorizon, PHM2008) into pandas DataFrames, fetching from remote storage on first use.
Yes, if you are building or benchmarking time-series forecasting models. The package eliminates manual dataset acquisition and provides standardized splits for reproducible research. Low install friction, active maintenance, and no known vulnerabilities make it a safe choice. Pre-Alpha status is not a blocker for research use, but be aware the API may change in future releases.
Install
datasetsforecast on PyPI
pip
pip install datasetsforecastuv
uv add datasetsforecastpoetry
poetry add datasetsforecastInstalling datasetsforecast
Before you install
Low friction: pure Python wheel, 8 common dependencies (numpy, pandas, scikit-learn, requests, aiohttp, tqdm, xlrd, utilsforecast). Active maintenance with recent commits; marked Pre-Alpha but in use.
License in practice
MIT License (permissive): you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install datasetsforecast
from datasetsforecast.phm2008 import PHM2008
train_df, test_df = PHM2008.load(directory='data', group='FD001')
Requires Python >=3.10. First load will download dataset to specified directory; ensure sufficient disk space and network access.
Verify before relying
- Total size of all datasets and typical download time not specified in fact sheet.
- Whether datasets are cached after first download or re-fetched on each load.
- API stability and backward compatibility guarantees given Pre-Alpha status.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — aiohttp, numpy, scikit-learn, pandas, requests, tqdm, utilsforecast, xlrd |
| Maintenance | actively maintained — 171 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 99,701/month — #13,014 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: datasetsforecast-1.0.1-py3-none-any.whl
Keywords: time-series, forecasting, datasets
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
tsdbTSDB downloads and loads 173 open-source…
permissive · top 15,000 on PyPI
hierarchicalforecastReconciles hierarchical time-series forecasts…
permissive · top 15,000 on PyPI
mlforecastmlforecast trains machine learning models on…
permissive · top 15,000 on PyPI
utilsforecastProvides utilities for time-series forecasting…
permissive · top 5,000 on PyPI
statsforecastStatsForecast provides fast implementations of…
permissive · top 5,000 on PyPI
neuralforecastNeuralForecast provides a collection of neural…
permissive · top 15,000 on PyPI
chronos-forecastingChronos provides pretrained transformer-based…
permissive · top 15,000 on PyPI
timesfmTimesFM is a pretrained time-series foundation…
permissive · top 15,000 on PyPI
pytorch-forecastingPyTorch Forecasting provides neural network…
permissive · top 15,000 on PyPI
skforecastSkforecast is a Python library for time series…
permissive · top 15,000 on PyPI