def setUp(self): self.holidays = holidays.England() self.holidays = holidays.Wales() self.holidays = holidays.Scotland() self.holidays = holidays.IsleOfMan() self.holidays = holidays.NorthernIreland() self.holidays = holidays.UK()
def uk_holiday(df,colm_dat,colm_reg): holdiay_list=[] for x in range(len(df)): if df.loc[x,colm_reg]=='England': uk_holidays =holidays.England() holdy=int(df_pharma_sales_raw.loc[x,'DATE'] in uk_holidays) elif df.loc[x,colm_reg]=='Scotland': uk_holidays =holidays.Scotland() holdy=int(df_pharma_sales_raw.loc[x,'DATE'] in uk_holidays) elif df.loc[x,colm_reg]=='Wales': uk_holidays =holidays.Wales() holdy=int(df_pharma_sales_raw.loc[x,'DATE'] in uk_holidays) elif df.loc[x,colm_reg]=='Northern Ireland': uk_holidays =holidays.NorthernIreland() holdy=int(df_pharma_sales_raw.loc[x,'DATE'] in uk_holidays) else: uk_holidays =holidays.UnitedKingdom() holdy=int(df_pharma_sales_raw.loc[x,'DATE'] in uk_holidays) holdiay_list.append(holdy) return holdiay_list
def setUp(self): self.holidays = holidays.Scotland()
canada_holidays = holidays.Canada() colombia_holidays = holidays.Colombia() czech_holidays = holidays.Czech() denmark_holidays = holidays.Denmark() england_holidays = holidays.England() europeancentralbank_holidays = holidays.EuropeanCentralBank() germany_holidays = holidays.Germany() ireland_holidays = holidays.Ireland() mexico_holidays = holidays.Mexico() netherlands_holidays = holidays.Netherlands() newzealand_holidays = holidays.NewZealand() northernireland_holidays = holidays.NorthernIreland() norway_holidays = holidays.Norway() portugal_holidays = holidays.Portugal() portugalext_holidays = holidays.PortugalExt() scotland_holidays = holidays.Scotland() spain_holidays = holidays.Spain() unitedkingdom_holidays = holidays.UnitedKingdom() unitedstates_holidays = holidays.UnitedStates() wales_holidays = holidays.Wales() def isDateHoliday(date, countryHolidays): return date in country def isTodayHoliday(countryHolidays): return today in countryHolidays def whatIsTodaysHoliday(countryHolidays): if isTodayHoliday(countryHolidays): return countryHolidays(today) return "Today is not a holiday in " + str(countryHolidays.country)