Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Oct 18:18
302772d

Highlights

  • Support for Python 3.15 and pandas 3.
  • Python 3.10 is no longer supported.
  • Dataset freq values now use current pandas aliases. This is a breaking change; see below.
  • Bug fixes for the Weather freq and for Favorita's one-hot features and loss weights.

⚠️ Breaking changes

Python 3.11 or newer is required

Python 3.10 reached end of life in October 2026. On Python 3.10, pip keeps installing datasetsforecast 1.0.2.

pandas 2.2.2 or newer is required

datasetsforecast now supports pandas>=2.2.2,<4. If you use an older pandas, upgrade it.

Dataset freq values changed

pandas 3 no longer accepts the old frequency aliases ('H', 'T', 'M', 'Q', 'Y'), so these datasets now use the current ones:

Dataset info Group(s) Old freq New freq
M4Info Yearly 'Y' 'YE'
M4Info Quarterly 'Q' 'QE'
M4Info Monthly 'M' 'ME'
M4Info Hourly 'H' 'h'
HierarchicalInfo TourismSmall 'Q' 'QE'
LongHorizonInfo, LongHorizon2Info ETTh1, ETTh2, TrafficL 'H' 'h'
LongHorizonInfo, LongHorizon2Info ETTm1, ETTm2, ECL '15T' '15min'
LongHorizonInfo, LongHorizon2Info Weather '10M' '10min' (bug fix, see below)

All other datasets are unchanged.

You can keep passing these values to pd.date_range, statsforecast, neuralforecast and similar tools without changes. Two kinds of code need updating:

1. Using freq as a Period frequency. pandas does not accept 'YE', 'QE' or 'ME' as Period frequencies, so code like this now raises an error:

df['ds'].dt.to_period(M4Info['Monthly'].freq)
# ValueError: Invalid frequency: ME. ... for Period, please use 'M' instead of 'ME'

Wrap the value in to_offset. This works for both Periods and dates, on pandas 2 and 3:

from pandas.tseries.frequencies import to_offset

df['ds'].dt.to_period(to_offset(M4Info['Monthly'].freq))

2. Comparing freq to a string, such as if info.freq == 'H':. Update the string to the new value, or compare offsets instead: to_offset(info.freq) == to_offset('h').

Favorita one-hot columns are in sorted order

As part of the fix below, the one-hot columns in Favorita's static_agg (family_[...], class_[...], perishable_[...]) are now ordered by category value. If you select these columns by position, select them by name instead.

Bug fixes

  • Weather freq meant 10 months instead of 10 minutes. LongHorizonInfo and LongHorizon2Info Weather used '10M', which pandas reads as 10 months, but the data is recorded every 10 minutes. It's now '10min'. If you built dates or seasonality from this value, rerun with the new one.
  • Favorita one-hot features could be mislabelled, which could also invert the loss weights. In some subsets, the one-hot column names didn't match their values. When that happened to perishable_[...], the prob loss weights were inverted: perishable items got 1.0 and the rest 1.25, instead of the reverse. Labels and weights are now correct. If you saved preprocessed Favorita data, regenerate it.

Upgrading to pandas 3

datasetsforecast works the same on pandas 3, but loaded data follows pandas 3's defaults:

  • Text columns such as unique_id are str instead of object.
  • Dates read from CSV (for example Favorita's ds) are datetime64[us] instead of datetime64[ns].

The first time you load each dataset after switching to pandas 3, it's rebuilt from the downloaded files instead of the cache, so that first load is slower. Nothing is re-downloaded.

Dependencies

  • pandas>=2.2.2,<4
  • aiohttp>=3.14.4, which includes security fixes

Full changelog: v1.0.2...v1.1.0

Changes