I have already checked the business days in python question but wasn't able to figure out how to do the following problem.
I want to check whether a date is a business date or weekend or holiday and if it is, I would like to add days until the next business day and append a new column as in the examples provided below:
I have the following pandas dataframe:
date
0 11/4/17 # Saturday
1 11/8/17
2 11/16/17
3 11/17/17
4 11/19/17 # Sunday
5 11/22/17
6 11/23/17
And then I would like to create a new column x['date_business']
with all business dates as in the following example:
date date_business
0 11/4/17 11/6/17
1 11/8/17 11/8/17
2 11/16/17 11/16/17
3 11/17/17 11/17/17
4 11/19/17 11/20/17
5 11/22/17 11/22/17
6 11/23/17 11/23/17