diff --git a/pandas/core/generic.py b/pandas/core/generic.py index bad42a85aeeee..d69e933164118 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3626,7 +3626,6 @@ class max_speed ) return self._constructor(new_data).__finalize__(self, method="take") - @final def _take_with_is_copy(self: FrameOrSeries, indices, axis=0) -> FrameOrSeries: """ Internal version of the `take` method that sets the `_is_copy` diff --git a/pandas/core/series.py b/pandas/core/series.py index cbec0024d5f9e..4d50c3100a12c 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -863,7 +863,7 @@ def take(self, indices, axis=0, is_copy=None, **kwargs) -> Series: result = self._constructor(new_values, index=new_index, fastpath=True) return result.__finalize__(self, method="take") - def _take_with_is_copy(self, indices, axis=0): + def _take_with_is_copy(self, indices, axis=0) -> Series: """ Internal version of the `take` method that sets the `_is_copy` attribute to keep track of the parent dataframe (using in indexing