-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Restrict clipping of DataFrame.corr only when cov=False #61214
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d63760a
clip correlation coefficient between -1 and 1
jhendricks487 1ffedbe
Added test to check if corr within bounds
jhendricks487 a997140
Added tuple to mistyped parameter
jhendricks487 7f2fdaa
Transfered np.clip to algos.nancorr
jhendricks487 34eb701
Clip covxy / divsor instead of result
jhendricks487 fc5ccae
Clip covxy / divsor within nogil
jhendricks487 904c892
Merge branch 'main' into clip-corr-edge-cases
j-hendricks c83ccaf
Merge branch 'main' into clip-corr-edge-cases
j-hendricks 2a2186d
Merge remote-tracking branch 'upstream/main' into clip-corr-edge-cases
jhendricks487 ff2adc6
Added whatsnew note
jhendricks487 f0573e1
Replaced long entry with single entry
jhendricks487 7c93140
restricted clipping to when cov=False
jhendricks487 cf07e2c
Merge branch 'main' into clip-corr-edge-cases
j-hendricks 23eb852
Added test for covariance
jhendricks487 3d873a0
Added test for covariance
jhendricks487 f0767f0
Changed name of test variables
jhendricks487 4a3b605
fixed test case for cov
jhendricks487 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Looks like the the expected dataframe needs
index=["A", "B"]
: https://github.com/pandas-dev/pandas/actions/runs/14250783260/job/39942795933?pr=61214#step:5:45And can you confirm that
1
is the expected value? If the 2.2.3 behavior is correct, then the values in #61154 (comment) were different:I don't know whether it matters, but it might be worth testing both
df.cov()
anddf.dropna().cov()
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.
Fixing now. Thanks!