Fix factorize() bug, due to housing_cat being a DataFrame, not a Series, fixes #104
parent
da9ed522b9
commit
7d7ccce9d3
|
@ -667,7 +667,8 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"housing_num = housing.select_dtypes(include=[np.number])"
|
||||
"housing_num = housing.drop('ocean_proximity', axis=1)\n",
|
||||
"# alternatively: housing_num = housing.select_dtypes(include=[np.number])"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -775,7 +776,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"housing_cat = housing.select_dtypes(exclude=[np.number])\n",
|
||||
"housing_cat = housing['ocean_proximity']\n",
|
||||
"housing_cat.head(10)"
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue