pydit.wrangling.date_time_calculations.EnglandAndWalesHolidayCalendar¶
- class pydit.wrangling.date_time_calculations.EnglandAndWalesHolidayCalendar(name: str = '', rules=None)[source]¶
Bases:
AbstractHolidayCalendarCalendar class for England and Wales.
Methods
Returns a curve with holidays between start_date and end_date
Merge holiday calendars together.
Merge holiday calendars together.
rule_from_nameAttributes
end_daterulesstart_date- holidays(start=None, end=None, return_name: bool = False) DatetimeIndex | Series¶
Returns a curve with holidays between start_date and end_date
- Parameters:
start (starting date, datetime-like, optional)
end (ending date, datetime-like, optional)
return_name (bool, optional) – If True, return a series that has dates and holiday names. False will only return a DatetimeIndex of dates.
- Return type:
DatetimeIndex of holidays
- merge(other, inplace: bool = False)¶
Merge holiday calendars together. The caller’s class rules take precedence. The merge will be done based on each holiday’s name.
- Parameters:
other (holiday calendar)
inplace (bool (default=False)) – If True set rule_table to holidays, else return array of Holidays
- static merge_class(base, other)¶
Merge holiday calendars together. The base calendar will take precedence to other. The merge will be done based on each holiday’s name.
- Parameters:
base (AbstractHolidayCalendar) – instance/subclass or array of Holiday objects
other (AbstractHolidayCalendar) – instance/subclass or array of Holiday objects