-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: GH38174 - Refactoring DataFrame.combine_first #47417
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
Conversation
…r.where instead of pandas.core.computation.expressions.where
Am i using the right where function? Do i have to use self._mgr.where(...) or self.where(...) ? |
pandas/core/frame.py
Outdated
y_values = extract_array(y, extract_numpy=True) | ||
|
||
# If the column y in other DataFrame is not in first DataFrame, | ||
# just return y_values. | ||
if y.name not in self.columns: | ||
return y_values | ||
|
||
return expressions.where(mask, y_values, x_values) | ||
values = self._mgr.where(y_values, mask, align=True, axis=1) |
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.
If you want to use Blockmanager.where, then this is correct
But seems to break tests
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.
Actually i think it's breaking because the axis parameter shouldn't be there, but even without it still break tests. Any tip of what should i do?
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
@hydratedguy closing as stale. Please ping of you want to continue |
You can fix this through making changes in the internals or use a different function |
But only a pandas dev can do changes in the internals right? And if i used a different function i woulnd't be following what the PR asked for. |
This is the pandas dev repo. Every contributor can make changes |
Hmm got it. Even so, I believe that as a beginner I am not able to solve this problem rn. Sorry for bothering you and thanks for answering me! |
Uh oh!
There was an error while loading. Please reload this page.