Questions tagged [python-holidays]

A Python library for generating country, province and state specific sets of holidays on the fly. It aims to make determining whether a specific date is a holiday easy.

Available from https://pypi.org/project/holidays

36 questions
0
votes
1 answer

isin holidays only recognizing the first hour

I have created a class with the holidays in Spain class SpainBusinessCalendar(AbstractHolidayCalendar): rules = [ #Spain - If one holiday is on a Sunday, each Autonomous Community can change it to a Monday. Holiday('Año Nuevo', month=1,…
Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83
0
votes
1 answer

Holiday Seasonality is all zeroes in FBProphet

I am trying to run a forecast on a time series that has several randomly distributed peaks. I know exactly when the peaks occur and I am telling Prophet that with the holidays dataframe. When I look at the components after fit and forecast, the…
0
votes
1 answer

Merge/Concat 2 dataframe with different holiday dates

I would like to merge/concat "outer" for 2 different dataframes with different set of holiday dates. Date column is string. Both dataframe prices exclude non-pricing days e.g. public holiday and weekends Assuming Dataframe 1 follows US…
distalr
  • 29
  • 3
0
votes
1 answer

Passing an array of countries to a function

I am fairly new to Python. I am leveraging Python's holidays package which has public holidays by country. I am looking to write a function that loops over any number of countries and returns a dataframe with 3 columns: Date, Holiday, Country Based…
biviz
  • 163
  • 8
-1
votes
1 answer

checking if it is a holiday based on date using holidays library -python

I have a dataset from the last 3 years, I would like to add a new column based on holidays. when I try this : import holidays de_holidays = holidays.DE() for date, name in sorted(holidays.DE(years=2021).items()): print(date, name) I get the…
sdave
  • 531
  • 4
  • 18
-1
votes
1 answer

Comparing 2 dataframes to add rows if between dates

completely new here, I tried looking up my problem but couldn't find anything quite similar! I'm trying to set up a dataframe that contains the data for a schedule and its activity types. For example, if it's '1' it's a normal activity, and if it's…
1 2
3