Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #56222 on branch 2.1.x (Add doc notes for deprecations) #56225

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading