Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. from pandas.tseries.offsets import CustomBusinessDay
  2. holidays = ['2012-05-01']
  3. next_business_day = CustomBusinessDay(holidays=holidays)
  4.  
  5. def F(datetime):
  6.     first_day_of_month = datetime.date().replace(day=1, hour=0)
  7.     first_business_day_of_month = first_day_of_month + next_business_day
  8.     return first_business_day_of_month
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement