get_holidays#

openstef_models.transforms.time_domain.holiday_features_adder.get_holidays(index: DatetimeIndex, country: CountryAlpha2, reserved_features: frozenset[str] = _DEFAULT_RESERVED_DATETIME_FEATURES) DataFrame[source]#

Get holidays for the dataset’s date range as a cleaned DataFrame.

Parameters:
  • index (DatetimeIndex) – DatetimeIndex of the dataset.

  • country (CountryAlpha2) – Country code for holiday calculation.

  • reserved_features (frozenset[str]) – Holiday names to exclude from results.

  • index

  • country

  • reserved_features

Returns:

date, holiday_name, sanitized_name. Empty DataFrame if no holidays found. Sanitized names are pre-cleaned (no empty strings, duplicates handled).

Return type:

DataFrame with columns

Return type:

DataFrame