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

[IDEA] Ch. 2: DataFrame.corr update #80

Open
hgato opened this issue May 30, 2023 · 1 comment
Open

[IDEA] Ch. 2: DataFrame.corr update #80

hgato opened this issue May 30, 2023 · 1 comment

Comments

@hgato
Copy link

hgato commented May 30, 2023

Good day!

File https://github.com/ageron/handson-ml3/blob/main/02_end_to_end_machine_learning_project.ipynb
In [35]:
Line: corr_matrix = housing.corr()

In the latest version of Pandas (2.0.2) attribute numeric_only of corr() method is defaulted to False. This causes an issue:
ValueError: could not convert string to float: 'NEAR BAY'

I suggest adding a comment about this issue and possible solution in the comment section). Alternatively you can default the value manually. For me code corr_matrix = housing.corr(numeric_only=True) works just fine.

Thank you!

@hgato hgato changed the title [IDEA] [IDEA] Ch. 2: DataFrame.corr update May 30, 2023
@oxbits
Copy link

oxbits commented Sep 11, 2023

@hgato thank you

good find 👍

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

2 participants