Skip to content
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] Chapter 2, Dataframe.corr raises an exception when using pandas 2.0.0 #101

Open
eranr opened this issue Nov 8, 2023 · 0 comments
Open

Comments

@eranr
Copy link

eranr commented Nov 8, 2023

As of Pandas version 2.0.0 Dataframe.corr breaks if there are non numeric columns.
The problem appears in a couple of cells. One in Section 2.2 and one in Section 2.3

To Reproduce

corr_matrix = housing.corr()

Solution

corr_matrix = housing.corr(numeric_only=True)

Versions:

  • MacOSX 14.0
  • Python: 3.11.6
  • Scikit-Learn: 1.3.1
  • Pandas 2.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant