data.fetch_data.fetch_holiday_data(
start,
end,
tz='UTC',
freq='h',
country_code='DE',
state='NW',
)
Fetches holiday data for the dataset period.
Parameters
| start |
str or pd.Timestamp |
Start date of the dataset period. |
required |
| end |
str or pd.Timestamp |
End date of the dataset period. |
required |
| tz |
str |
Timezone for the holiday data. |
'UTC' |
| freq |
str |
Frequency of the holiday data. |
'h' |
| country_code |
str |
Country code for the holidays. |
'DE' |
| state |
str |
State code for the holidays. |
'NW' |
Returns
|
pd.DataFrame |
pd.DataFrame: DataFrame containing holiday information. |
Examples
from spotforecast2_safe.data.fetch_data import fetch_holiday_data
holiday_df = fetch_holiday_data(
start='2023-01-01T00:00',
end='2023-01-10T00:00',
tz='UTC',
freq='h',
country_code='DE',
state='NW'
)
holiday_df.head()
| 2023-01-01 00:00:00+00:00 |
1 |
| 2023-01-01 01:00:00+00:00 |
1 |
| 2023-01-01 02:00:00+00:00 |
1 |
| 2023-01-01 03:00:00+00:00 |
1 |
| 2023-01-01 04:00:00+00:00 |
1 |