Skip to content

Commit 83f6275

Browse files
authored
Add doc notes for deprecations (#56222)
1 parent f3f0249 commit 83f6275

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/core/generic.py

+8
Original file line numberDiff line numberDiff line change
@@ -9661,6 +9661,10 @@ def first(self, offset) -> Self:
96619661
"""
96629662
Select initial periods of time series data based on a date offset.
96639663
9664+
.. deprecated:: 2.1
9665+
:meth:`.first` is deprecated and will be removed in a future version.
9666+
Please create a mask and filter using `.loc` instead.
9667+
96649668
For a DataFrame with a sorted DatetimeIndex, this function can
96659669
select the first few rows based on a date offset.
96669670
@@ -9740,6 +9744,10 @@ def last(self, offset) -> Self:
97409744
"""
97419745
Select final periods of time series data based on a date offset.
97429746
9747+
.. deprecated:: 2.1
9748+
:meth:`.last` is deprecated and will be removed in a future version.
9749+
Please create a mask and filter using `.loc` instead.
9750+
97439751
For a DataFrame with a sorted DatetimeIndex, this function
97449752
selects the last few rows based on a date offset.
97459753

0 commit comments

Comments
 (0)