I want to create a datafarme with the holidays using the python holiday library.
from datetime import date
import holidays
us_holidays = holidays.US()
date(2015, 1, 1) in us_holidays # True
date(2015, 1, 2) in us_holidays # False
I want to create a dataframe with dates and holiday column. For example I want to create a data frame of holidays from 01.01.2019 to 31.12.2020
Expected Output:
date holiday
01.01.2019 1
09.03.2019 1
.
.
.
31.12.2020 1
How can I extract this dataframe from the holiday package?