|
16 | 16 | 'MonthBegin', 'BMonthBegin', 'MonthEnd', 'BMonthEnd',
|
17 | 17 | 'YearBegin', 'BYearBegin', 'YearEnd', 'BYearEnd',
|
18 | 18 | 'QuarterBegin', 'BQuarterBegin', 'QuarterEnd', 'BQuarterEnd',
|
19 |
| - 'LastWeekOfMonth', 'FY5253Quarter', 'FY5253', |
20 |
| - 'Week', 'WeekOfMonth', |
| 19 | + 'FY5253Quarter', 'FY5253', |
| 20 | + 'Week', 'WeekOfMonth', 'LastWeekOfMonth', |
21 | 21 | 'Hour', 'Minute', 'Second', 'Milli', 'Micro', 'Nano']
|
22 | 22 |
|
23 | 23 | # convert to/from datetime/timestamp to allow invalid Timestamp ranges to pass thru
|
@@ -1848,32 +1848,7 @@ def generate_range(start=None, end=None, periods=None,
|
1848 | 1848 | raise ValueError('Offset %s did not increment date' % offset)
|
1849 | 1849 | cur = next_date
|
1850 | 1850 |
|
1851 |
| -prefix_mapping = dict((offset._prefix, offset) for offset in [ |
1852 |
| - YearBegin, # 'AS' |
1853 |
| - YearEnd, # 'A' |
1854 |
| - BYearBegin, # 'BAS' |
1855 |
| - BYearEnd, # 'BA' |
1856 |
| - BusinessDay, # 'B' |
1857 |
| - BusinessMonthBegin, # 'BMS' |
1858 |
| - BusinessMonthEnd, # 'BM' |
1859 |
| - BQuarterEnd, # 'BQ' |
1860 |
| - BQuarterBegin, # 'BQS' |
1861 |
| - CustomBusinessDay, # 'C' |
1862 |
| - MonthEnd, # 'M' |
1863 |
| - MonthBegin, # 'MS' |
1864 |
| - Week, # 'W' |
1865 |
| - Second, # 'S' |
1866 |
| - Minute, # 'T' |
1867 |
| - Micro, # 'U' |
1868 |
| - QuarterEnd, # 'Q' |
1869 |
| - QuarterBegin, # 'QS' |
1870 |
| - Milli, # 'L' |
1871 |
| - Hour, # 'H' |
1872 |
| - Day, # 'D' |
1873 |
| - WeekOfMonth, # 'WOM' |
1874 |
| - FY5253, |
1875 |
| - FY5253Quarter, |
1876 |
| -]) |
| 1851 | +prefix_mapping = dict([(locals()[offset]._prefix, offset) for offset in __all__]) |
1877 | 1852 |
|
1878 | 1853 | if not _np_version_under1p7:
|
1879 | 1854 | # Only 1.7+ supports nanosecond resolution
|
|
0 commit comments