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 )
More Related Contents:
- Converting between datetime, Timestamp and datetime64
- Iterating through a range of dates in Python
- Convert datetime object to a String of date only in Python
- How to construct a timedelta object from a simple string
- Combine Date and Time columns using python pandas
- Parsing date with timezone from an email?
- How to increment datetime by custom months in python without using library [duplicate]
- Convert timedelta to years?
- Check if string has date, any format
- Formatting timedelta objects [duplicate]
- python pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- How to convert a python datetime.datetime to excel serial date number
- matplotlib bar chart with dates
- How to add timezone into a naive datetime instance in python [duplicate]
- Parsing datetime in Python..?
- How to group a pandas dataframe by a defined time interval?
- Python Pandas Group by date using datetime data
- Convert numpy.datetime64 to string object in python
- Removing the timestamp from a datetime in pandas dataframe
- Subtract a year from a datetime column in pandas
- Pythonic difference between two dates in years?
- Get the Olson TZ name for the local timezone?
- Pandas: How to create a datetime object from Week and Year?
- Plotting dates on the x-axis
- How to convert epoch time with nanoseconds to human-readable?
- Python pandas integer YYYYMMDD to datetime
- What values are valid in Pandas ‘Freq’ tags?
- need to convert UTC (aws ec2) to PST in Python
- Convert dates to pd.to_datetime where month could be either a number or month name
- Pandas: select all dates with specific month and day