From 6529ab79f48345a2028a1ed7f508d90c839b7350 Mon Sep 17 00:00:00 2001 From: Ajitesh Singh Date: Sun, 18 Apr 2021 01:56:02 +0530 Subject: [PATCH 1/2] fix: function _take_with_is_copy was defined final but overriden --- pandas/core/generic.py | 1 - 1 file changed, 1 deletion(-) 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` From 29fd9c4cda0a734bcecb22d7156640ddf852e9a2 Mon Sep 17 00:00:00 2001 From: Ajitesh Singh Date: Sun, 18 Apr 2021 14:30:07 +0530 Subject: [PATCH 2/2] fix: add return type --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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