Run notebooks with updates and custom kernel
This commit is contained in:
parent
8e72ec726c
commit
baa7d06cdc
6 changed files with 189 additions and 163 deletions
|
|
@ -1319,7 +1319,7 @@
|
|||
"sns.boxplot(x=\"Neighborhood\", y=\"SalePrice\", data=df, ax=ax)\n",
|
||||
"ax.set_title(\"Prices by Neighborhood\", fontsize=24)\n",
|
||||
"ax.set_xlabel(\"Neighborhood\", fontsize=18)\n",
|
||||
"ax.set_xticklabels(ax.get_xticklabels(), rotation=45)\n",
|
||||
"ax.tick_params(axis='x', labelrotation = 45)\n",
|
||||
"ax.set_ylabel(\"House Price\", fontsize=18);"
|
||||
]
|
||||
},
|
||||
|
|
@ -1336,7 +1336,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"neighborhood = pd.get_dummies(df[\"Neighborhood\"], prefix=\"nhood\")\n",
|
||||
"neighborhood = pd.get_dummies(df[\"Neighborhood\"], prefix=\"nhood\", dtype=int)\n",
|
||||
"df = pd.concat([df, neighborhood], axis=1)\n",
|
||||
"del df[\"Neighborhood\"]"
|
||||
]
|
||||
|
|
@ -1827,7 +1827,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"build_type = pd.get_dummies(df[\"Bldg Type\"], prefix=\"build_type\")\n",
|
||||
"build_type = pd.get_dummies(df[\"Bldg Type\"], prefix=\"build_type\", dtype=int)\n",
|
||||
"df = pd.concat([df, build_type], axis=1)\n",
|
||||
"del df[\"Bldg Type\"]"
|
||||
]
|
||||
|
|
@ -2118,7 +2118,7 @@
|
|||
"PosA 24\n",
|
||||
"RRNn 11\n",
|
||||
"RRNe 6\n",
|
||||
"dtype: int64"
|
||||
"Name: count, dtype: int64"
|
||||
]
|
||||
},
|
||||
"execution_count": 34,
|
||||
|
|
@ -2527,13 +2527,14 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Foundation\n",
|
||||
"PConc 1282\n",
|
||||
"CBlock 1242\n",
|
||||
"BrkTil 310\n",
|
||||
"Slab 48\n",
|
||||
"Stone 11\n",
|
||||
"Wood 5\n",
|
||||
"Name: Foundation, dtype: int64"
|
||||
"Name: count, dtype: int64"
|
||||
]
|
||||
},
|
||||
"execution_count": 50,
|
||||
|
|
@ -2580,7 +2581,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"foundation = pd.get_dummies(df[\"Foundation\"], prefix=\"found\")\n",
|
||||
"foundation = pd.get_dummies(df[\"Foundation\"], prefix=\"found\", dtype=int)\n",
|
||||
"# Only keep the top 3 realizations.\n",
|
||||
"del foundation[\"found_Slab\"]\n",
|
||||
"del foundation[\"found_Stone\"]\n",
|
||||
|
|
@ -2958,6 +2959,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"MS Zoning\n",
|
||||
"RL 2252\n",
|
||||
"RM 459\n",
|
||||
"FV 131\n",
|
||||
|
|
@ -2966,7 +2968,7 @@
|
|||
"A 2\n",
|
||||
"I 2\n",
|
||||
"RP 0\n",
|
||||
"Name: MS Zoning, dtype: int64"
|
||||
"Name: count, dtype: int64"
|
||||
]
|
||||
},
|
||||
"execution_count": 67,
|
||||
|
|
@ -3161,13 +3163,14 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Sale Condition\n",
|
||||
"Normal 2396\n",
|
||||
"Partial 233\n",
|
||||
"Abnorml 189\n",
|
||||
"Family 46\n",
|
||||
"Alloca 22\n",
|
||||
"AdjLand 12\n",
|
||||
"Name: Sale Condition, dtype: int64"
|
||||
"Name: count, dtype: int64"
|
||||
]
|
||||
},
|
||||
"execution_count": 77,
|
||||
|
|
@ -3437,9 +3440,10 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Street\n",
|
||||
"Pave 2886\n",
|
||||
"Grvl 12\n",
|
||||
"Name: Street, dtype: int64"
|
||||
"Name: count, dtype: int64"
|
||||
]
|
||||
},
|
||||
"execution_count": 87,
|
||||
|
|
@ -4948,9 +4952,9 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"display_name": "ames-housing",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
"name": "ames-housing"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
|
|
@ -4962,7 +4966,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.5"
|
||||
"version": "3.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue