-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG/API: Series arithmetic ops inconsistently hold names #10068
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 looks like just need to pass |
The fix is in ops.py - https://github.com/pydata/pandas/blob/master/pandas/core/ops.py#L509 - I added a check for |
@vikramls I don't think we want to change that behavior (if names are different, the resulting name should be |
@shoyer - The test-case checks the same scenario that this bug is addressed to. Does this mean that the bug is not valid? from test_series.py: result = self.ts + cp # self.ts and cp are both Series objects
self.assertIsNone(result.name) Series.add is executed via the |
@vikramls To clarify, I think this behavior is correct:
and this behavior is the bug:
|
@shoyer, thanks for the clarification. In this case the bug is triggered by the call to |
Based on
Index
behavior,Series
arithmetic should reset name when names are different?The text was updated successfully, but these errors were encountered: