-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Index __sub__ should check for instance of Index #8142
Labels
Milestone
Comments
guess that is a bit inconsistent. Would appreciate a pull-request. |
Closed
going to be moot after #8226 |
Looks like the #8226 changes indeed rendered this moot. |
PR for validation of this would be great :) |
dsm054
added a commit
to dsm054/pandas
that referenced
this issue
Jun 8, 2017
dsm054
added a commit
to dsm054/pandas
that referenced
this issue
Jun 8, 2017
jreback
pushed a commit
that referenced
this issue
Jun 8, 2017
Kiv
pushed a commit
to Kiv/pandas
that referenced
this issue
Jun 11, 2017
stangirala
pushed a commit
to stangirala/pandas
that referenced
this issue
Jun 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
add currently behaves like this:
def add(self, other):
if isinstance(other, Index):
return self.union(other)
else:
return Index(np.array(self) + other)
but subtraction falls straight through to diff.
so if index_object is an Int64Index, the following behavior takes place:
index_object + 1 => add one to all indices
index_object - 1 => error in diff
index_object + -1 => subtract one from all indices
The text was updated successfully, but these errors were encountered: