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

BUG: Fix bug for kendall corr when in DF num and bool #11560

Merged
merged 1 commit into from Nov 13, 2015

Conversation

Projects
None yet
2 participants
@roman-khomenko
Contributor

roman-khomenko commented Nov 9, 2015

Hi,

  1. When DataFrame contain Numerics and Booleans, than numpy will have type object,
    so np.isfinite(mat) will raise Exception.

I've fixed this by using com._ensure_float64 like for other correlation.

  1. I've skipped half of computation, because correlation is symmetrical
@jreback

View changes

Show outdated Hide outdated pandas/core/frame.py Outdated
@jreback

View changes

Show outdated Hide outdated pandas/tests/test_frame.py Outdated

@jreback jreback added the Numeric label Nov 9, 2015

@roman-khomenko

This comment has been minimized.

Show comment
Hide comment
@roman-khomenko

roman-khomenko Nov 9, 2015

Contributor

@jreback Jeff,
I've fixed handling NaN and added test for that.

Contributor

roman-khomenko commented Nov 9, 2015

@jreback Jeff,
I've fixed handling NaN and added test for that.

@jreback

View changes

Show outdated Hide outdated pandas/tests/test_frame.py Outdated
@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback Nov 10, 2015

Contributor

couple of comments. pls add a whatsnew (put in bug fixes), use this PR number as the issue number. squash, then ping when green.

Contributor

jreback commented Nov 10, 2015

couple of comments. pls add a whatsnew (put in bug fixes), use this PR number as the issue number. squash, then ping when green.

@jreback jreback added this to the 0.17.1 milestone Nov 10, 2015

@roman-khomenko

This comment has been minimized.

Show comment
Hide comment
@roman-khomenko
Contributor

roman-khomenko commented Nov 10, 2015

@jreback Done

jreback added a commit that referenced this pull request Nov 13, 2015

Merge pull request #11560 from roman-khomenko/roman-khomenko/fix-kend…
…all-for-num-and-bool

BUG: Fix bug for kendall corr when in DF num and bool

@jreback jreback merged commit 49cd89b into pandas-dev:master Nov 13, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback Nov 13, 2015

Contributor

thanks!

Contributor

jreback commented Nov 13, 2015

thanks!

@roman-khomenko roman-khomenko deleted the roman-khomenko:roman-khomenko/fix-kendall-for-num-and-bool branch Nov 13, 2015

@roman-khomenko

This comment has been minimized.

Show comment
Hide comment
@roman-khomenko

roman-khomenko Nov 13, 2015

Contributor

@jreback Thank you for pandas!

Contributor

roman-khomenko commented Nov 13, 2015

@jreback Thank you for pandas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment