From 3be2de63e4c6cfbd04671f86d07869dfc984e9ed Mon Sep 17 00:00:00 2001 From: gfyoung Date: Mon, 10 Jul 2017 03:12:50 -0700 Subject: [PATCH] MAINT: Drop the get_offset_name method (#16863) Deprecated since 0.18.0 xref gh-11834 --- doc/source/whatsnew/v0.21.0.txt | 1 + pandas/tseries/frequencies.py | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index d5cc3d6ddca8e..43bfebd0c2e59 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -126,6 +126,7 @@ Removal of prior version deprecations/changes - ``Index`` has dropped the ``.sym_diff()`` method in favor of ``.symmetric_difference()`` (:issue:`12591`) - ``Categorical`` has dropped the ``.order()`` and ``.sort()`` methods in favor of ``.sort_values()`` (:issue:`12882`) - :func:`eval` and :method:`DataFrame.eval` have changed the default of ``inplace`` from ``None`` to ``False`` (:issue:`11149`) +- The function ``get_offset_name`` has been dropped in favor of the ``.freqstr`` attribute for an offset (:issue:`11834`) .. _whatsnew_0210.performance: diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index 8640f106a048a..c5f6c00a4005a 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -637,20 +637,6 @@ def get_offset(name): getOffset = get_offset -def get_offset_name(offset): - """ - Return rule name associated with a DateOffset object - - Examples - -------- - get_offset_name(BMonthEnd(1)) --> 'EOM' - """ - - msg = "get_offset_name(offset) is deprecated. Use offset.freqstr instead" - warnings.warn(msg, FutureWarning, stacklevel=2) - return offset.freqstr - - def get_standard_freq(freq): """ Return the standardized frequency string