Skip to content

Commit

Permalink
MAINT: Drop the get_offset_name method (#16863)
Browse files Browse the repository at this point in the history
Deprecated since 0.18.0

xref gh-11834
  • Loading branch information
gfyoung authored and jreback committed Jul 10, 2017
1 parent 9c44f9b commit 3be2de6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.21.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 0 additions & 14 deletions pandas/tseries/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3be2de6

Please sign in to comment.