Skip to content

DEPR: DatetimeIndex.offset #20716

Closed
@jschendel

Description

@jschendel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions