

@staticmethod
def merge_class(base, other):
    "\n        Merge holiday calendars together. The base calendar\n        will take precedence to other. The merge will be done\n        based on each holiday's name.\n\n        Parameters\n        ----------\n        base : AbstractHolidayCalendar\n          instance/subclass or array of Holiday objects\n        other : AbstractHolidayCalendar\n          instance/subclass or array of Holiday objects\n        "
    try:
        other = other.rules
    except:
        pass
    if (not isinstance(other, list)):
        other = [other]
    other_holidays = dict(((holiday.name, holiday) for holiday in other))
    try:
        base = base.rules
    except:
        pass
    if (not isinstance(base, list)):
        base = [base]
    base_holidays = dict([(holiday.name, holiday) for holiday in base])
    other_holidays.update(base_holidays)
    return list(other_holidays.values())

dataset/ETHPy150Open pydata/pandas/pandas/tseries/holiday.py AbstractHolidayCalendar.merge_class/original