Skip to content

Commit

Permalink
add description to whatsnew and revert unwanted changes in datetimear…
Browse files Browse the repository at this point in the history
…ray docstring
  • Loading branch information
annika-rudolph committed Apr 30, 2024
1 parent 211edec commit b2a244a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/source/whatsnew/v3.0.0.rst
Expand Up @@ -418,7 +418,8 @@ Missing
MultiIndex
^^^^^^^^^^
- :func:`DataFrame.loc` with ``axis=0`` and :class:`MultiIndex` when setting a value adds extra columns (:issue:`58116`)
-
- :func:`MultiIndex.get_level_values` accessing a :class:`DatetimeIndex` does not carry the frequency attribute along (:issue:`58327`, :issue:`57949`)
-

I/O
^^^
Expand Down
7 changes: 6 additions & 1 deletion pandas/core/arrays/datetimelike.py
Expand Up @@ -1798,7 +1798,7 @@ def strftime(self, date_format: str) -> npt.NDArray[np.object_]:
----------
freq : str or Offset
The frequency level to {op} the index to. Must be a fixed
frequency like 'S' (second) not 'ME' (month end). See
frequency like 's' (second) not 'ME' (month end). See
:ref:`frequency aliases <timeseries.offset_aliases>` for
a list of possible `freq` values.
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
Expand Down Expand Up @@ -1836,6 +1836,11 @@ def strftime(self, date_format: str) -> npt.NDArray[np.object_]:
------
ValueError if the `freq` cannot be converted.
See Also
--------
DatetimeIndex.floor : Perform floor operation on the data to the specified `freq`.
DatetimeIndex.snap : Snap time stamps to nearest occurring frequency.
Notes
-----
If the timestamps have a timezone, {op}ing will take place relative to the
Expand Down

0 comments on commit b2a244a

Please sign in to comment.