-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Added 'pearson' to methods list in pandas/core/nanops.py #30603
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
Changes from 2 commits
6804926
0f1a2f2
a7decf4
ed6f9c9
51d5901
a2cc03e
866c70e
c3350db
260a826
9571c3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ dependencies: | |
- pytables | ||
- python-dateutil==2.6.1 | ||
- pytz | ||
- scipy>=1.1 | ||
- xarray | ||
- xlrd | ||
- xlsxwriter | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1241,7 +1241,7 @@ def nancorr(a, b, method="pearson", min_periods=None): | |
|
||
|
||
def get_corr_func(method): | ||
if method in ["kendall", "spearman"]: | ||
if method in ["kendall", "spearman", "pearson"]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actrually, why is this necessary at all? this just uses numpy and not scipy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You asked me to:) ref - #30461 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh right, but this is not actually the correct check, instead do like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. raise ValueError(f"Unrecognized method '{method}'") Sounds good? (probably not, my English is not so good) And also, should I remove all the "Skip" decorators Iv'e added in ed6f9c9 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure & yes remove the skips |
||
from scipy.stats import kendalltau, spearmanr | ||
elif callable(method): | ||
return method | ||
|
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.
hmm, we should be skipping tests if the deps are not installed, which test is the issue?
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.
For the macOS build, at least.
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.
then these should have a skip in place