Skip to content

Commit

Permalink
Backport PR #56222: Add doc notes for deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored and meeseeksmachine committed Nov 28, 2023
1 parent 2d812e2 commit 1655bfe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -9456,6 +9456,10 @@ def first(self, offset) -> Self:
"""
Select initial periods of time series data based on a date offset.
.. deprecated:: 2.1
:meth:`.first` is deprecated and will be removed in a future version.
Please create a mask and filter using `.loc` instead.
For a DataFrame with a sorted DatetimeIndex, this function can
select the first few rows based on a date offset.
Expand Down Expand Up @@ -9535,6 +9539,10 @@ def last(self, offset) -> Self:
"""
Select final periods of time series data based on a date offset.
.. deprecated:: 2.1
:meth:`.last` is deprecated and will be removed in a future version.
Please create a mask and filter using `.loc` instead.
For a DataFrame with a sorted DatetimeIndex, this function
selects the last few rows based on a date offset.
Expand Down

0 comments on commit 1655bfe

Please sign in to comment.