@@ -30,7 +30,7 @@ from pandas._libs.tslibs.util cimport is_integer_object, is_datetime64_object
30
30
from pandas._libs.tslibs.base cimport ABCTimestamp
31
31
32
32
from pandas._libs.tslibs.ccalendar import (
33
- MONTHS, DAYS, MONTH_ALIASES, MONTH_TO_CAL_NUM, weekday_to_int, int_to_weekday,
33
+ MONTH_ALIASES, MONTH_TO_CAL_NUM, weekday_to_int, int_to_weekday,
34
34
)
35
35
from pandas._libs.tslibs.ccalendar cimport get_days_in_month, dayofweek
36
36
from pandas._libs.tslibs.conversion cimport (
@@ -45,53 +45,6 @@ from pandas._libs.tslibs.tzconversion cimport tz_convert_single
45
45
46
46
from .timedeltas cimport delta_to_nanoseconds
47
47
48
- # ---------------------------------------------------------------------
49
- # Constants
50
-
51
- _offset_to_period_map = {
52
- ' WEEKDAY' : ' D' ,
53
- ' EOM' : ' M' ,
54
- ' BM' : ' M' ,
55
- ' BQS' : ' Q' ,
56
- ' QS' : ' Q' ,
57
- ' BQ' : ' Q' ,
58
- ' BA' : ' A' ,
59
- ' AS' : ' A' ,
60
- ' BAS' : ' A' ,
61
- ' MS' : ' M' ,
62
- ' D' : ' D' ,
63
- ' C' : ' C' ,
64
- ' B' : ' B' ,
65
- ' T' : ' T' ,
66
- ' S' : ' S' ,
67
- ' L' : ' L' ,
68
- ' U' : ' U' ,
69
- ' N' : ' N' ,
70
- ' H' : ' H' ,
71
- ' Q' : ' Q' ,
72
- ' A' : ' A' ,
73
- ' W' : ' W' ,
74
- ' M' : ' M' ,
75
- ' Y' : ' A' ,
76
- ' BY' : ' A' ,
77
- ' YS' : ' A' ,
78
- ' BYS' : ' A' }
79
-
80
- need_suffix = [' QS' , ' BQ' , ' BQS' , ' YS' , ' AS' , ' BY' , ' BA' , ' BYS' , ' BAS' ]
81
-
82
- for __prefix in need_suffix:
83
- for _m in MONTHS:
84
- key = f' {__prefix}-{_m}'
85
- _offset_to_period_map[key] = _offset_to_period_map[__prefix]
86
-
87
- for __prefix in [' A' , ' Q' ]:
88
- for _m in MONTHS:
89
- _alias = f' {__prefix}-{_m}'
90
- _offset_to_period_map[_alias] = _alias
91
-
92
- for _d in DAYS:
93
- _offset_to_period_map[f' W-{_d}' ] = f' W-{_d}'
94
-
95
48
96
49
# ---------------------------------------------------------------------
97
50
# Misc Helpers
0 commit comments