Skip to content

Commit 331fef4

Browse files
ajiteshsinghyeshsurya
authored andcommitted
fix: function _take_with_is_copy was defined final but overriden (pandas-dev#41004)
* fix: function _take_with_is_copy was defined final but overriden * fix: add return type
1 parent 98b78d2 commit 331fef4

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pandas/core/generic.py

-1
Original file line numberDiff line numberDiff line change
@@ -3626,7 +3626,6 @@ class max_speed
36263626
)
36273627
return self._constructor(new_data).__finalize__(self, method="take")
36283628

3629-
@final
36303629
def _take_with_is_copy(self: FrameOrSeries, indices, axis=0) -> FrameOrSeries:
36313630
"""
36323631
Internal version of the `take` method that sets the `_is_copy`

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ def take(self, indices, axis=0, is_copy=None, **kwargs) -> Series:
863863
result = self._constructor(new_values, index=new_index, fastpath=True)
864864
return result.__finalize__(self, method="take")
865865

866-
def _take_with_is_copy(self, indices, axis=0):
866+
def _take_with_is_copy(self, indices, axis=0) -> Series:
867867
"""
868868
Internal version of the `take` method that sets the `_is_copy`
869869
attribute to keep track of the parent dataframe (using in indexing

0 commit comments

Comments
 (0)