DEPR: DatetimeIndex.offset · Issue #20716 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
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
.