This repository was archived by the owner on Apr 1, 2026. It is now read-only.
feat: Add DataFrame.corrwith method#1315
Merged
TrevorBergeron merged 3 commits intomainfrom Jan 24, 2025
Merged
Conversation
f31308b to
c972d07
Compare
sycai
reviewed
Jan 23, 2025
| numeric_only: bool = False, | ||
| ): | ||
| other_frame = other if isinstance(other, DataFrame) else other.to_frame() | ||
| if not numeric_only: |
Contributor
There was a problem hiding this comment.
Let's re-write this if-else block as
if numeric_only:
...
else
...
See go/tott/685
| pd.testing.assert_series_equal( | ||
| bf_result, pd_result, check_dtype=False, check_index_type=False | ||
| ) | ||
|
|
Contributor
There was a problem hiding this comment.
Perhaps we should add two more cases:
numeric_only = True, two dfs contain only numeric columns => computation proceeds successfully
numeric_only = True, one of the dfs has a non-numeric column => an error is raised.
sycai
approved these changes
Jan 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕