You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework deprecation around future.infer_freq_returns_offset option
Mirror the GH#55504 inferred_freq pattern: respect the option to opt in
to (or out of) the future BaseOffset behavior, only warn when inference
succeeds, fix the migration advice (DatetimeIndex(ser).freq is always
None now that arrays carry no freq), and add dedicated tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v3.1.0.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Other API changes
104
104
105
105
Deprecations
106
106
~~~~~~~~~~~~
107
-
- Deprecated :attr:`Series.dt.freq` returning a string. In a future version, this will return a :class:`DateOffset` object (or ``None``) to match :attr:`DatetimeIndex.freq` (:issue:`64701`)
107
+
- Deprecated :attr:`Series.dt.freq` returning a string; in a future version this will return a :class:`BaseOffset` instead. Use ``pd.set_option('future.infer_freq_returns_offset', True)`` to opt in to the future behavior (:issue:`64701`)
108
108
- Deprecated :attr:`Timestamp.dayofweek`, :attr:`Timestamp.dayofyear`, :attr:`Timestamp.daysinmonth` in favor of :attr:`Timestamp.day_of_week`, :attr:`Timestamp.day_of_year`, :attr:`Timestamp.days_in_month`, respectively. The same deprecation applies to the corresponding attributes on :class:`Period`, :class:`DatetimeIndex`, :class:`PeriodIndex`, and :attr:`Series.dt` (:issue:`46768`)
109
109
- Deprecated :func:`infer_freq`, :attr:`DatetimeIndex.inferred_freq`, and :attr:`TimedeltaIndex.inferred_freq` returning a string; in a future version these will return a :class:`BaseOffset` instead. Use ``pd.set_option('future.infer_freq_returns_offset', True)`` to opt in to the future behavior (:issue:`55504`)
110
110
- Deprecated :func:`set_eng_float_format`. Use ``pd.set_option("display.precision", N)`` to control decimal precision, or pass a custom callable to ``pd.set_option("display.float_format", func)`` (:issue:`64460`)
0 commit comments