Chapter 2: Generic way of selecting numerical or categorical attributes
parent
7e4f99085f
commit
bbe33f7039
|
@ -689,7 +689,7 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"housing_num = housing.drop(\"ocean_proximity\", axis=1)"
|
||||
"housing_num = housing.select_dtypes(include=[np.number])"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -797,7 +797,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"housing_cat = housing[\"ocean_proximity\"]\n",
|
||||
"housing_cat = housing.select_dtypes(exclude=[np.number])\n",
|
||||
"housing_cat.head(10)"
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue