Skip to content

DEPR: DatetimeIndex.offset #20716

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
jschendel opened this issue Apr 17, 2018 · 5 comments · Fixed by #20730
Closed

DEPR: DatetimeIndex.offset #20716

jschendel opened this issue Apr 17, 2018 · 5 comments · Fixed by #20730
Labels
API Design Deprecate Functionality to remove in pandas
Milestone

Comments

@jschendel
Copy link
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.

@gfyoung gfyoung added API Design Deprecate Functionality to remove in pandas labels Apr 17, 2018
@jorisvandenbossche
Copy link
Member

+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
Copy link
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
Copy link

subhrm commented Apr 17, 2018

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

@jschendel
Copy link
Member Author

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

@subhrm
Copy link

subhrm commented Apr 17, 2018

@jschendel Okay.

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

Successfully merging a pull request may close this issue.

5 participants