BUG: bdate_range with cbh fails (original) (raw)

Pandas version checks

Reproducible Example

Based on https://github.com/pandas-dev/pandas/issues/24555#issuecomment-450909512

START = pd.Timestamp(2009, 3, 13) END1 = pd.Timestamp(2009, 3, 18) END2 = pd.Timestamp(2009, 3, 19)

freq = 'CBH' a = pd.bdate_range(START, END1, freq=freq, weekmask='Mon Wed Fri', holidays=['2009-03-14']) # <- raises

freq = 'cbh' a = pd.bdate_range(START, END1, freq=freq, weekmask='Mon Wed Fri', holidays=['2009-03-14']) # <- still raises

Issue Description

IIUC we deprecated the upper-cast "h" and so now instead of "CBH" we want "cbh". But inside bdate_range we have a check for isinstance(freq, str) and freq.startswith("C"). I suspect that needs to be updated to check for lowercase "c"? cc @natmokval ?

Expected Behavior

N/A

Installed Versions

Replace this line with the output of pd.show_versions()