Skip to content

DEPR: DatetimeIndex.snap() #27098

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

Open
jreback opened this issue Jun 28, 2019 · 2 comments
Open

DEPR: DatetimeIndex.snap() #27098

jreback opened this issue Jun 28, 2019 · 2 comments
Labels
Datetime Datetime data dtype Deprecate Functionality to remove in pandas

Comments

@jreback
Copy link
Contributor

jreback commented Jun 28, 2019

we have a DatetimeIndex.snap, this is duplicative of our more general .ceil(), .floor() and .round() (and .to_period().to_timestamp()); the former are also generally available on all of the timelike indices (DTI, TDI, PI)

we should remove this and prefer the 3 rounding methods

@jreback jreback added Datetime Datetime data dtype Deprecate Functionality to remove in pandas labels Jun 28, 2019
@jreback jreback added this to the Contributions Welcome milestone Jun 28, 2019
@jreback jreback changed the title DEPR: .snap() DEPR: DatetimeIndex.snap() Jun 28, 2019
@ghost
Copy link

ghost commented Jun 29, 2019

Corollary: isn't normalize just floor('D')?

@ghost
Copy link

ghost commented Jul 17, 2019

To be clear, round/floor/ceil do not currently accept non-ticks while snap() does. I've started on a fix for those methods, but no responses.

Until that's fixed, deprecating would mean deleting useful functionality.

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Deprecate Functionality to remove in pandas
Projects
None yet
Development

No branches or pull requests

2 participants