Skip to content

Commit 3be2de6

Browse files
gfyoungjreback
authored andcommitted
MAINT: Drop the get_offset_name method (#16863)
Deprecated since 0.18.0 xref gh-11834
1 parent 9c44f9b commit 3be2de6

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

doc/source/whatsnew/v0.21.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ Removal of prior version deprecations/changes
126126
- ``Index`` has dropped the ``.sym_diff()`` method in favor of ``.symmetric_difference()`` (:issue:`12591`)
127127
- ``Categorical`` has dropped the ``.order()`` and ``.sort()`` methods in favor of ``.sort_values()`` (:issue:`12882`)
128128
- :func:`eval` and :method:`DataFrame.eval` have changed the default of ``inplace`` from ``None`` to ``False`` (:issue:`11149`)
129+
- The function ``get_offset_name`` has been dropped in favor of the ``.freqstr`` attribute for an offset (:issue:`11834`)
129130

130131

131132
.. _whatsnew_0210.performance:

pandas/tseries/frequencies.py

-14
Original file line numberDiff line numberDiff line change
@@ -637,20 +637,6 @@ def get_offset(name):
637637
getOffset = get_offset
638638

639639

640-
def get_offset_name(offset):
641-
"""
642-
Return rule name associated with a DateOffset object
643-
644-
Examples
645-
--------
646-
get_offset_name(BMonthEnd(1)) --> 'EOM'
647-
"""
648-
649-
msg = "get_offset_name(offset) is deprecated. Use offset.freqstr instead"
650-
warnings.warn(msg, FutureWarning, stacklevel=2)
651-
return offset.freqstr
652-
653-
654640
def get_standard_freq(freq):
655641
"""
656642
Return the standardized frequency string

0 commit comments

Comments
 (0)