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: DatetimeIndex.offset #20716

Closed
jschendel opened this Issue Apr 17, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@jschendel
Member

jschendel commented Apr 17, 2018

DatetimeIndex.offset and DatimeIndex.freq refer to the same thing, and are used interchangeably throughout the code for DatetimeIndex:

@property
def freq(self):
"""get/set the frequency of the Index"""
return self.offset

Is there a reason for having both?

TimedeltaIndex and PeriodIndex only have freq, so it seems like we could keep freq for consistency, deprecate DatetimeIndex.offset, and modify the DatetimeIndex code to only use freq.

@jorisvandenbossche

This comment has been minimized.

Member

jorisvandenbossche commented Apr 17, 2018

+1 to deprecate .offset (will probably need some rework, as now it is freq that is calling offset which is used internally it seems)

@jreback

This comment has been minimized.

Contributor

jreback commented Apr 17, 2018

note we deprecated Timestamp.offset in #13593

@jreback jreback added this to the Next Major Release milestone Apr 17, 2018

@subhrm

This comment has been minimized.

subhrm commented Apr 17, 2018

If no one has started working on this, I would like to take this up.

@jschendel

This comment has been minimized.

Member

jschendel commented Apr 17, 2018

@subhrm : I've started some work on this as a precursor to fixes for #20678

@subhrm

This comment has been minimized.

subhrm commented Apr 17, 2018

@jschendel Okay.

@jreback jreback modified the milestones: Next Major Release, 0.23.0 Apr 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment