-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
RangeIndex copy behaviour differs from other indices #12288
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
Comments
this is a bug in the constructor I think. It should match what |
So These look ok
While Int64Index does not
|
I think we have 2 problems here: the one I reported and the one you now point at. If we fix the one you're pointing at, we will still have a difference that |
Or to put it shortly: this test fails in master. I think it shouldn't. Do you agree? [Y/n] |
ok, going to merge your fix, pls open a new issue for the |
It is my understanding that the
copy
parameter ofRangeIndex
is present virtually only for API compatibility with other indices: however the behaviour forcopy=False
differs from other indices in what follows:In other words, since
RangeIndex
doesn't have any data to copy, the value of thecopy
parameter should be irrelevant. For homogeneity with other indices, we should always act as ifcopy=True
. The docs should also be changed to state thatcopy
parameter has no effect and is present only for API compatibility. I'll push a PR if you agree.The text was updated successfully, but these errors were encountered: