Skip to content

Commit db9e448

Browse files
nameloCmaSpre-commit-ci[bot]max-sixty
authored
dt.weekday_name - removal of function (#8664)
* Removed dt.weekday_name property * string formatting * remove from doc source * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * whats-new * Revert "whats-new" This reverts commit 41c7940. * whats-new * suggested changes: accessor_dt.py Co-authored-by: Maximilian Roos <[email protected]> * suggested changes: accessor_dt.py Co-authored-by: Maximilian Roos <[email protected]> * suggested changes: whats-new.rst Co-authored-by: Maximilian Roos <[email protected]> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Roos <[email protected]>
1 parent 6801e27 commit db9e448

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

doc/api-hidden.rst

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
core.accessor_dt.DatetimeAccessor.time
135135
core.accessor_dt.DatetimeAccessor.week
136136
core.accessor_dt.DatetimeAccessor.weekday
137-
core.accessor_dt.DatetimeAccessor.weekday_name
138137
core.accessor_dt.DatetimeAccessor.weekofyear
139138
core.accessor_dt.DatetimeAccessor.year
140139

doc/api.rst

-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ Datetimelike properties
523523
DataArray.dt.nanosecond
524524
DataArray.dt.dayofweek
525525
DataArray.dt.weekday
526-
DataArray.dt.weekday_name
527526
DataArray.dt.dayofyear
528527
DataArray.dt.quarter
529528
DataArray.dt.days_in_month

doc/whats-new.rst

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Breaking changes
3030

3131
Deprecations
3232
~~~~~~~~~~~~
33+
- The `dt.weekday_name` parameter wasn't functional on modern pandas versions and has been removed. (:issue:`8610`, :pull:`8664`)
34+
By `Sam Coleman <https://github.com/nameloCmaS>`_.
3335

3436

3537
Bug fixes
@@ -73,6 +75,9 @@ Documentation
7375

7476
- Pin ``sphinx-book-theme`` to ``1.0.1`` to fix a rendering issue with the sidebar in the docs. (:issue:`8619`, :pull:`8632`)
7577
By `Tom Nicholas <https://github.com/TomNicholas>`_.
78+
- Fixed documentation where the use of the depreciated pandas frequency string
79+
prevented the documentation from being built. (:pull:`8638`)
80+
By `Sam Coleman <https://github.com/nameloCmaS>`_.
7681

7782
.. _whats-new.2024.01.0:
7883

xarray/core/accessor_dt.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _access_through_cftimeindex(values, name):
5959
field_values = _season_from_months(months)
6060
elif name == "date":
6161
raise AttributeError(
62-
"'CFTimeIndex' object has no attribute `date`. Consider using the floor method instead, for instance: `.time.dt.floor('D')`."
62+
"'CFTimeIndex' object has no attribute `date`. Consider using the floor method "
63+
"instead, for instance: `.time.dt.floor('D')`."
6364
)
6465
else:
6566
field_values = getattr(values_as_cftimeindex, name)
@@ -456,11 +457,6 @@ def dayofweek(self) -> T_DataArray:
456457

457458
weekday = dayofweek
458459

459-
@property
460-
def weekday_name(self) -> T_DataArray:
461-
"""The name of day in a week"""
462-
return self._date_field("weekday_name", object)
463-
464460
@property
465461
def dayofyear(self) -> T_DataArray:
466462
"""The ordinal day of the year"""

0 commit comments

Comments
 (0)