I have a function which calculates the Holidays for a given year like this:
holidays = bf.Holidays(year)
the problem is, there is no way to edit the Holidays function so i need another solutions.
I have a datafame with some years, example:
year
0 2005
1 2011
2 2015
3 2017
right now if i do this:
yearX = year.get_value(0, 0)
and run
holidays = bf.Holidays(yearX)
it just calculates the holidays for the first year in the dataframe (2005)
How can i implement that the function should take every year and append it?
using a for loop?
Example how it works now:
year = df['YEAR']
yearX = year.get_value(0,0)
holidays = bf.Holidays(year)
holidays = holidays.get_holiday_list()
print(holidays)
output:
DATE
2005-01-01
2005-03-25
2005-03-27
2005-03-28
2005-05-01
but i want it to calculate for very dataframe row, not only the first one