Skip to content

samiaab1990/getNYCholidayspy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getNYCholidayspy

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.

GitHub tag (latest by 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.

Installation

You can install the development version of getNYCholidays from GitHub with:

pip install git+https://github.com/samiaab1990/getNYCholidayspy.git#egg=getNYCholidayspy 

Example

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"))

About

A Python version of the getNYCholidays package. Retrieves a vector 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.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages