-
Notifications
You must be signed in to change notification settings - Fork 358
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
Support operations between Series and Index. #1996
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1996 +/- ##
==========================================
- Coverage 94.51% 92.94% -1.57%
==========================================
Files 50 50
Lines 10965 10878 -87
==========================================
- Hits 10364 10111 -253
- Misses 601 767 +166
Continue to review full report at Codecov.
|
Looks fine otherwise |
else: | ||
index_ops = self._align_and_column_op(f, *args) | ||
raise ValueError(ERROR_MESSAGE_CANNOT_COMBINE) | ||
|
||
if not all(self.name == col.name for col in cols): | ||
index_ops = index_ops.rename(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering whether index_ops
's name should always be None
for operations between Series and Index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I may have some concern about what index_ops
means. It seems to be the result we return finally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xinrong-databricks When the name is same, seems they keep it in pandas.
>>> pd.Series([1, 2, 3], name="Koalas") + pd.Index([2, 3, 4], name="Koalas")
0 3
1 5
2 7
Name: Koalas, dtype: int64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks!
Thanks! merging. |
Supports operations between
Series
andIndex
.