A Python version of the getNYCholidays package. Retrieves an array of official NYC holiday dates from the NYC Office of Payroll Administration's List of Holidays PDF. Allows to retrieve dates by filtering on holiday name, weekday and date.
Retrieves a data frame of official NYC holidays (Python version of R package). Developed to get list of dates to exclude from reporting pipeline run times.
You can install the development version of getNYCholidays from GitHub with:
pip install git+https://github.com/samiaab1990/getNYCholidayspy.git#egg=getNYCholidayspy from getNYCholidayspy import getnycholidays
# gets data frame
print(getnycholidays.dataframe)
# gets dates only
print(getnycholidays.dates)
# gets date from keyword
print(getnycholidays.holidaydate(holiday_keyword = "New Years"))
# gets holiday date from date
print(getnycholidays.holidaydate(date_keyword = "2022-01-01"))
# gets holiday date from weekday
print(getnycholidays.holidaydate(weekday="Monday"))
# returns day of week from keyword
print(getnycholidays.returnday(holiday_keyword = "New Years"))
# returns day of week from date
print(getnycholidays.returnday(date_keyword = "2022-01-01"))
# returns day of week from weekday
print(getnycholidays.returnday(weekday="Monday"))