更新时间:2023-01-31 14:10:13
我认为最干净的解决方案是使用 numpy 函数 busday_count
I think the cleanest solution is to use the numpy function 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 )