We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f7a7f2 commit d21c195Copy full SHA for d21c195
pandas/_libs/tslibs/offsets.pyx
@@ -12,6 +12,7 @@ from cpython.datetime cimport (
12
time as dt_time,
13
timedelta,
14
)
15
+import warnings
16
17
import_datetime()
18
@@ -4220,6 +4221,11 @@ cpdef to_offset(freq):
4220
4221
4222
tups = zip(split[0::4], split[1::4], split[2::4])
4223
for n, (sep, stride, name) in enumerate(tups):
4224
+ if name == 'M':
4225
+ warnings.warn(
4226
+ f"'M' will be deprecated, please use 'ME' for 'month end'",
4227
+ UserWarning,
4228
+ )
4229
if sep != "" and not sep.isspace():
4230
raise ValueError("separator must be spaces")
4231
prefix = _lite_rule_alias.get(name) or name
0 commit comments