ageron / handson-ml

⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 instead.
Apache License 2.0
25.22k stars 12.91k forks source link

Chapter 2: Looking for Correlations - ValueError: could not convert string to float: 'INLAND' #680

Closed SybilRamkin closed 1 year ago

SybilRamkin commented 1 year ago

Hi there,

First of all thanks for the great book. I enjoy learning with the hands-on examples! When calling the correlation method an error is thrown. Supposedly because the ocean proximity contains strings and not numbers. How can I fix the error and get the correlation matrix?

Thanks in advance!

hands_on

SybilRamkin commented 1 year ago

dropped the ocean_proximity column

housing.drop(housing.columns[[9]], axis=1, inplace=True)