-
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
Implement Series.update #923
Conversation
Codecov Report
@@ Coverage Diff @@
## master #923 +/- ##
==========================================
- Coverage 94.83% 94.76% -0.07%
==========================================
Files 34 34
Lines 6640 6652 +12
==========================================
+ Hits 6297 6304 +7
- Misses 343 348 +5
Continue to review full report at Codecov.
|
#926) This fixes the bug at #923 (comment).
@ueshin Thanks! fixed related with |
@ueshin Thanks for reviewing!! resolved to use column names properly |
raise ValueError("'other' must be a Series") | ||
|
||
index_scol_names = [index_map[0] for index_map in self._internal.index_map] | ||
combined = combine_frames(self.to_frame(), other.to_frame(), how='leftouter') |
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 think you can:
kdf = self.to_frame()
kdf[other_column_name] = other
that_column = scol_for(kdf, other.name)
this_column = scol_for(kdf, self.name)
cond = F.when(
that_column.isNotNull(), that_column
).otherwise(this_column).alias(...)
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.
@HyukjinKwon Thanks for reviewing! what if other.name
and self.name
are same?? i think maybe kdf[other_column_name] = other
will overwrite existing column, wouldn't it??
@itholic can you rebase this please? |
@HyukjinKwon yep. i just did :) |
Softagram Impact Report for pull/923 (head commit: 2e219e0)⭐ Change Overview
📄 Full report
Impact Report explained. Give feedback on this report to [email protected] |
…. (#926) This fixes the bug at databricks/koalas#923 (comment).
Like pandas Series.update (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.update.html#pandas.Series.update)
implemented function
update
for series.