diff --git a/doc/source/timeseries.rst b/doc/source/timeseries.rst index 466c48b780861..58d3cb1091f97 100644 --- a/doc/source/timeseries.rst +++ b/doc/source/timeseries.rst @@ -1155,6 +1155,8 @@ frequencies. We will refer to these aliases as *offset aliases*. "L, ms", "milliseconds" "U, us", "microseconds" "N", "nanoseconds" + "WOM, "x-th day of the y-th week of each month frequency" + "LWOM", "x-th day of the last week of each month frequency" Combining Aliases ~~~~~~~~~~~~~~~~~ diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py index 2e4be7fbdeebf..7758d48009436 100644 --- a/pandas/tseries/offsets.py +++ b/pandas/tseries/offsets.py @@ -2451,23 +2451,29 @@ def generate_range(start=None, end=None, periods=None, prefix_mapping = dict((offset._prefix, offset) for offset in [ - YearBegin, # 'AS' YearEnd, # 'A' - BYearBegin, # 'BAS' - BYearEnd, # 'BA' + YearBegin, # 'AS' BusinessDay, # 'B' + BYearEnd, # 'BA' + BYearBegin, # 'BAS' + BusinessHour, # 'BH' BusinessMonthBegin, # 'BMS' BusinessMonthEnd, # 'BM' BQuarterEnd, # 'BQ' BQuarterBegin, # 'BQS' - BusinessHour, # 'BH' CustomBusinessDay, # 'C' + CustomBusinessHour, # 'CBH' CustomBusinessMonthEnd, # 'CBM' CustomBusinessMonthBegin, # 'CBMS' - CustomBusinessHour, # 'CBH' + Day, # 'D' + Hour, # 'H' + Milli, # 'L' + LastWeekOfMonth, # 'LWOM' MonthEnd, # 'M' MonthBegin, # 'MS' Nano, # 'N' + FY5253, # 'RE' + FY5253Quarter, # 'REQ' SemiMonthEnd, # 'SM' SemiMonthBegin, # 'SMS' Week, # 'W' @@ -2476,10 +2482,5 @@ def generate_range(start=None, end=None, periods=None, Micro, # 'U' QuarterEnd, # 'Q' QuarterBegin, # 'QS' - Milli, # 'L' - Hour, # 'H' - Day, # 'D' WeekOfMonth, # 'WOM' - FY5253, - FY5253Quarter, ])