Skip to content

DEPR: tz_convert, tz_localize, to_timestamp, to_period #55521

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

Closed
wants to merge 3 commits into from

Conversation

jbrockmendel
Copy link
Member

@mroeschke mroeschke added Deprecate Functionality to remove in pandas Index Related to the Index class or subclasses labels Oct 16, 2023
@@ -235,6 +235,7 @@ Other Deprecations
^^^^^^^^^^^^^^^^^^
- Changed :meth:`Timedelta.resolution_string` to return ``h``, ``min``, ``s``, ``ms``, ``us``, and ``ns`` instead of ``H``, ``T``, ``S``, ``L``, ``U``, and ``N``, for compatibility with respective deprecations in frequency aliases (:issue:`52536`)
- Deprecated :meth:`Index.format`, use ``index.astype(str)`` or ``index.map(formatter)`` instead (:issue:`55413`)
- Deprecated :meth:`Series.to_period`, :meth:`DataFrame.to_period`, :meth:`Series.to_timestamp`, :meth:`DataFrame.to_timestamp`, :meth:`Series.tz_localize`, :meth:`DataFrame.tz_localize`, :meth:`Series.tz_convert`, :meth:`DataFrame.tz_convert`, use the relevant methods on ``obj.set_axis(obj.index.relevant_method(...))`` instead (:issue:`52110`)
Copy link
Member

Choose a reason for hiding this comment

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

obj.set_axis(obj.index.relevant_method(...))

I realized this might be inconvenient for users calling these methods in a chain. Maybe we need that pd.col or equivalent to make this deprecation more migrate-able?

Copy link
Member Author

Choose a reason for hiding this comment

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

that was part of the appeal of the obj.axis_ops.tz_convert idea

Copy link
Member

Choose a reason for hiding this comment

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

I wasn't opposed to the axis_op idea (I didn't have much time to review the PR sadly)

Copy link
Member Author

Choose a reason for hiding this comment

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

ill revive that PR as an alternative

Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

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 Index Related to the Index class or subclasses Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: NDFrame.to_period, to_timestamp, tz_localize, tz_convert
2 participants