From 560077c8a70bd476c93e720f8f6e93cf39193f17 Mon Sep 17 00:00:00 2001 From: JayCarraway <42996200+JayCarraway@users.noreply.github.com> Date: Wed, 4 Mar 2020 01:24:48 +0100 Subject: [PATCH] Add possibility of selecting province of country for creation of holiday (#1340) dataframe --- python/fbprophet/make_holidays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/fbprophet/make_holidays.py b/python/fbprophet/make_holidays.py index c5823d8..7da7095 100644 --- a/python/fbprophet/make_holidays.py +++ b/python/fbprophet/make_holidays.py @@ -40,7 +40,7 @@ def get_holiday_names(country): return set(holiday_names) -def make_holidays_df(year_list, country): +def make_holidays_df(year_list, country, province=None): """Make dataframe of holidays for given years and countries Parameters @@ -57,7 +57,7 @@ def make_holidays_df(year_list, country): holidays = getattr(hdays_part2, country)(years=year_list) except AttributeError: try: - holidays = getattr(hdays_part1, country)(years=year_list) + holidays = getattr(hdays_part1, country)(prov=province,years=year_list) except AttributeError: raise AttributeError( "Holidays in {} are not currently supported!".format(country))