:func: See: Make *_range functions consistent #17482 (c...">

DOC: Fixes after #17482 by jschendel · Pull Request #17554 · pandas-dev/pandas (original) (raw)

@jorisvandenbossche

I was wondering: can't we just merge the two functions?

From a technical standpoint this would be straightforward, and I'd be happy to submit a PR to do so, if that's what's ultimately decided.

Really, both bdate_range and cdate_range could be merged into date_range without a lot of effort.
Doesn't look like bdate_range/ cdate_range are used within the codebase other than tests, and a brief mention in the docs. Aside from that, just a matter of adding the extra keywords to date_range, and directing users to change cdate_range(...) -> date_range(..., freq='C'), and bdate_range(...) -> date_range(..., freq='B'). The same holds for just merging cdate_range into bdate_range, if that would be preferable.