pandas.bdate_range
pandas 3.1.1 · General functions · function
Build a DatetimeIndex of business days, optionally using a custom workweek and holidays.
Call syntax
pd.bdate_range(…) Full signature
pd.bdate_range(
start=None,
end=None,
periods=None,
freq='B',
tz=None,
normalize=True,
name=None,
weekmask=None,
holidays=None,
inclusive='both',
**kwargs,
)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
start |
Optional Positional or keyword Default None |
str or datetime-like Supply the start point of a range, slice, or calculation. |
end |
Optional Positional or keyword Default None |
str or datetime-like Supply the endpoint of the range or calculation. |
periods |
Optional Positional or keyword Default None |
int Set a count of generated observations or the number of steps to shift or compare. |
freq |
Optional Positional or keyword Default 'B' |
str, Timedelta, datetime.timedelta, or DateOffset Specify the frequency or offset, such as "D" for a day or "MS" for a calendar month start. |
tz |
Optional Positional or keyword Default None |
str or None Supply a timezone name or timezone object. |
normalize |
Optional Positional or keyword Default True |
bool Request normalized output, such as proportions for counts or midnight for datetimes. |
name |
Optional Positional or keyword Default None |
Hashable Set a name or identify the named object used by the operation. |
weekmask |
Optional Positional or keyword Default None |
str or None |
holidays |
Optional Positional or keyword Default None |
list-like or None |
inclusive |
Optional Positional or keyword Default 'both' |
{"both", "neither", "left", "right"} Choose whether the start, end, both, or neither boundary is included. |
**kwargs |
Optional Additional keyword arguments |
Returns
DatetimeIndex