I need to create a calendar with delivery dates for the whole year. The rule is simple - the delivery requires at least 2 business and special days from the order date.
index order_date business_day special_day delivery_date
0 2021-01-01 0 0 2021-01-05
1 2021-01-02 0 0 2021-01-05
2 2021-01-03 0 0 2021-01-05
3 2021-01-04 1 1 2021-01-06
4 2021-01-05 1 1 2021-01-07
5 2021-01-06 1 1 ???
I thought that I need to pass a function that has access to both axes but I have no idea how to do it.
df['delivery_date'] = df.apply(lambda x: getDeliveryDate(x),axis=1)