mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-06-25 02:50:49 +00:00
Add possibility of selecting province of country for creation of holiday (#1340)
dataframe
This commit is contained in:
parent
0efd3d2abd
commit
560077c8a7
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue