Skip to content

DEPR: DatetimeIndex.snap() #27098

@jreback

Description

@jreback
Contributor

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

Activity

added this to the Contributions Welcome milestone on Jun 28, 2019
changed the title [-]DEPR: .snap()[/-] [+]DEPR: DatetimeIndex.snap()[/+] on Jun 28, 2019
ghost

ghost commented on Jun 29, 2019

@ghost

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

ghost

ghost commented on Jul 17, 2019

@ghost

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.

removed this from the Contributions Welcome milestone on Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeDeprecateFunctionality to remove in pandas

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jreback@mroeschke

        Issue actions

          DEPR: DatetimeIndex.snap() · Issue #27098 · pandas-dev/pandas