Skip to content

Commit dbc446a

Browse files
authored
CLN: no kwargs for take_with_is_copy (#32181)
1 parent 016482a commit dbc446a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pandas/core/generic.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3262,17 +3262,15 @@ class max_speed
32623262
)
32633263
return self._constructor(new_data).__finalize__(self)
32643264

3265-
def _take_with_is_copy(
3266-
self: FrameOrSeries, indices, axis=0, **kwargs
3267-
) -> FrameOrSeries:
3265+
def _take_with_is_copy(self: FrameOrSeries, indices, axis=0) -> FrameOrSeries:
32683266
"""
32693267
Internal version of the `take` method that sets the `_is_copy`
32703268
attribute to keep track of the parent dataframe (using in indexing
32713269
for the SettingWithCopyWarning).
32723270
32733271
See the docstring of `take` for full explanation of the parameters.
32743272
"""
3275-
result = self.take(indices=indices, axis=axis, **kwargs)
3273+
result = self.take(indices=indices, axis=axis)
32763274
# Maybe set copy if we didn't actually change the index.
32773275
if not result._get_axis(axis).equals(self._get_axis(axis)):
32783276
result._set_is_copy(self)

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ def take(self, indices, axis=0, is_copy=None, **kwargs) -> "Series":
812812
new_values, index=new_index, fastpath=True
813813
).__finalize__(self)
814814

815-
def _take_with_is_copy(self, indices, axis=0, **kwargs):
815+
def _take_with_is_copy(self, indices, axis=0):
816816
"""
817817
Internal version of the `take` method that sets the `_is_copy`
818818
attribute to keep track of the parent dataframe (using in indexing
@@ -821,7 +821,7 @@ def _take_with_is_copy(self, indices, axis=0, **kwargs):
821821
822822
See the docstring of `take` for full explanation of the parameters.
823823
"""
824-
return self.take(indices=indices, axis=axis, **kwargs)
824+
return self.take(indices=indices, axis=axis)
825825

826826
def _ixs(self, i: int, axis: int = 0):
827827
"""

0 commit comments

Comments
 (0)