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] #621

Open
andremarchesi opened this issue Aug 8, 2023 · 2 comments
Open

[BUG] #621

andremarchesi opened this issue Aug 8, 2023 · 2 comments

Comments

@andremarchesi
Copy link

Hi, in 02_end_to_end_machine_learning_project.ipynb:

'''corr_matrix = housing.corr()'''

How the dataframe was copied to housing, and don't drop column "ocean_proximity", the function corr() is with error.
So I drop the column temporarily!

@martinclauss
Copy link

This is due to a recent change: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html (cf. numeric_only parameter)

You can use

corr_matrix = housing.corr(numeric_only=True)

instead.

HTH

@romanbo
Copy link

romanbo commented Jun 15, 2024

Thanks for this. It was driving me nuts!

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

3 participants