nixtla_client = NixtlaClient( # defaults to os.environ.get("NIXTLA_API_KEY") api_key = 'my_api_key_provided_by_nixtla')
👍 Use an Azure AI endpointTo use an Azure AI endpoint, remember to set also the base_url
argument:nixtla_client = NixtlaClient(base_url="you azure ai endpoint", api_key="your api_key")
Copy
Ask AI
# Get country holidays for the USc_holidays = CountryHolidays(countries=['US'])periods = 365 * 1dates = pd.date_range(end='2023-09-01', periods=periods)holidays_df = c_holidays(dates)# Specify your own special datesspecial_dates = SpecialDates( special_dates={ 'Important Dates': ['2021-02-26', '2020-02-26'], 'Very Important Dates': ['2021-01-26', '2020-01-26', '2019-01-26'] })periods = 365 * 1dates = pd.date_range(end='2023-09-01', periods=periods)special_dates_df = special_dates(dates)
For a detailed guide on using special dates and holidays, read our
tutorial on Holidays and special
dates.