Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPR: Deprecate DatetimeIndex.offset in favor of DatetimeIndex.freq #20730

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

jschendel
Copy link
Member

@@ -405,6 +405,18 @@ def test_equals(self):
assert not idx.equals(list(idx3))
assert not idx.equals(pd.Series(idx3))

def test_offset_deprecated(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the ideal location for this test

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. can you run all of the tests and see if any deprecation warnings show (and if they do fix those cases).

@@ -877,6 +877,7 @@ Deprecations
- The ``convert_datetime64`` parameter in :func:`DataFrame.to_records` has been deprecated and will be removed in a future version. The NumPy bug motivating this parameter has been resolved. The default value for this parameter has also changed from ``True`` to ``None`` (:issue:`18160`).
- :func:`Series.rolling().apply() <pandas.core.window.Rolling.apply>`, :func:`DataFrame.rolling().apply() <pandas.core.window.Rolling.apply>`,
:func:`Series.expanding().apply() <pandas.core.window.Expanding.apply>`, and :func:`DataFrame.expanding().apply() <pandas.core.window.Expanding.apply>` have deprecated passing an ``np.array`` by default. One will need to pass the new ``raw`` parameter to be explicit about what is passed (:issue:`20584`)
- ``DatetimeIndex.offset`` is deprecated. Use ``DatetimeIndex.freq`` instead (:issue:`20716`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a ref in api for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not mentioned in api.rst, so this is fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let’s add it there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, no, I thought you asked about offset, which we don't need to add since we are deprecating it. freq is already correctly listed in api.rst

@jreback jreback added Frequency DateOffsets Deprecate Functionality to remove in pandas labels Apr 19, 2018
@jreback jreback added this to the 0.23.0 milestone Apr 19, 2018
@jorisvandenbossche
Copy link
Member

can you run all of the tests and see if any deprecation warnings show (and if they do fix those cases).

none seen in travis/appveyor

@jorisvandenbossche jorisvandenbossche merged commit 78fee04 into pandas-dev:master Apr 19, 2018
@jorisvandenbossche
Copy link
Member

@jschendel Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Frequency DateOffsets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: DatetimeIndex.offset
3 participants