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
DEPR: Deprecate week, weekofyear in Series.dt,DatetimeIndex (pandas-dev#33595)
* Deprecate week and weekofyear in Series.dt/DatetimeIndex
* Add What's New for deprecations
* Ignore week/weekofyear attributes in tests
* Remove week/weekofyear attributes from tests
* Add isocalendar test to replace removed week/weekofyear tests
* Add PR issue number
* Import warnings at top of module
* Tag deprecation tests with PR
* Refactor test to improve readability
* Return ndarray from DatetimeArray.week
- This is then wrapped by DatetimeIndex.week
Co-authored-by: Jeff Reback <[email protected]>
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v1.1.0.rst
+3
Original file line number
Diff line number
Diff line change
@@ -590,6 +590,9 @@ Deprecations
590
590
591
591
- :func:`pandas.api.types.is_categorical` is deprecated and will be removed in a future version; use `:func:pandas.api.types.is_categorical_dtype` instead (:issue:`33385`)
592
592
- :meth:`Index.get_value` is deprecated and will be removed in a future version (:issue:`19728`)
593
+
- :meth:`Series.dt.week` and `Series.dt.weekofyear` are deprecated and will be removed in a future version, use :meth:`Series.dt.isocalendar().week` instead (:issue:`33595`)
594
+
- :meth:`DatetimeIndex.week` and `DatetimeIndex.weekofyear` are deprecated and will be removed in a future version, use :meth:`DatetimeIndex.isocalendar().week` instead (:issue:`33595`)
595
+
- :meth:`DatetimeArray.week` and `DatetimeArray.weekofyear` are deprecated and will be removed in a future version, use :meth:`DatetimeArray.isocalendar().week` instead (:issue:`33595`)
593
596
- :meth:`DateOffset.__call__` is deprecated and will be removed in a future version, use ``offset + other`` instead (:issue:`34171`)
594
597
- Indexing an :class:`Index` object with a float key is deprecated, and will
595
598
raise an ``IndexError`` in the future. You can manually convert to an integer key
0 commit comments