How can I calculate number of days between two dates excluding weekends?
I think the cleanest solution is to use the numpy function busday_count
busday_count
import numpy as np import datetime as dt start = dt.date( 2014, 1, 1 ) end = dt.date( 2014, 1, 16 ) days = np.busday_count( start, end )
1.4m articles
1.4m replys
5 comments
57.0k users