Skip to content

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

Closed
wants to merge 3 commits into from
Closed

REF: GH38174 - Refactoring DataFrame.combine_first #47417

wants to merge 3 commits into from

Conversation

hydratedguy
Copy link
Contributor

@hydratedguy hydratedguy commented Jun 19, 2022

@hydratedguy
Copy link
Contributor Author

Am i using the right where function? Do i have to use self._mgr.where(...) or self.where(...) ?

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)
Copy link
Member

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

Copy link
Contributor Author

@hydratedguy hydratedguy Jun 20, 2022

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?

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Jul 22, 2022
@phofl
Copy link
Member

phofl commented Aug 1, 2022

@hydratedguy closing as stale. Please ping of you want to continue

@phofl phofl closed this Aug 1, 2022
@hydratedguy
Copy link
Contributor Author

Hey @phofl ! From what i've seen i think that to solve #38174 it's needed to do changes on a Internals file, so there's not much i can do. What do you think?

@phofl
Copy link
Member

phofl commented Aug 1, 2022

You can fix this through making changes in the internals or use a different function

@hydratedguy
Copy link
Contributor Author

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.

@phofl
Copy link
Member

phofl commented Aug 1, 2022

This is the pandas dev repo. Every contributor can make changes

@hydratedguy
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REF/CLN: DataFrame.combine_first
2 participants