Skip to content

CLN: remove kwargs from RangeIndex.copy #35575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,13 @@ def _shallow_copy(self, values=None, name: Label = no_default):
return Int64Index._simple_new(values, name=name)

@doc(Int64Index.copy)
def copy(self, name=None, deep=False, dtype=None, **kwargs):
def copy(self, name=None, deep=False, dtype=None, names=None):
self._validate_dtype(dtype)
if name is None:
name = self.name
return self.from_range(self._range, name=name)

new_index = self._shallow_copy()
names = self._validate_names(name=name, names=names, deep=deep)
new_index = new_index.set_names(names)
return new_index

def _minmax(self, meth: str):
no_steps = len(self) - 1
Expand Down