Merge cdate_range functionality into bdate_range · Issue #17596 · pandas-dev/pandas (original) (raw)
Following up on some discussion from #17554.
The main point of discussion was regarding merging the functionality of cdate_range
into bdate_range
. This would involve adding the two additional keywords supported by cdate_range
to bdate_range
(weekmask
and holidays
), which would only be used (if provided) when a custom frequency is passed to bdate_range
.
This wouldn't be terribly invasive, as cdate_range
is only top-level on master (not 0.20.3), and there is no documentation mentioning it. Performing the merge would help keep the top-level API clean, and reduce the number of date_range
related functions. On the user end, the change would amount to cdate_range(...)
-> bdate_range(..., freq='C')
.
An alternative would be to merge both bdate_range
and cdate_range
into date_range
. The only difference between bdate_range
and date_range
is the default value of freq
, so from a technical standpoint it wouldn't add complexity to implement compared to just merging cdate_range
-> bdate_range
.
This would be a more invasive change though, as bdate_range
currently is currently top-level, and there is some documentation mentioning it, so there'd be some additional work in terms of deprecation/doc modification. It would provide the advantage of having only one date_range
related function. On the user end, the change would amount to cdate_range(...)
-> date_range(..., freq='C')
, and bdate_range(...)
-> date_range(..., freq='B')
.
The current plan is to do the cdate_range
-> bdate_range
merge, but we're interested in community input.