Skip to content

Commit

Permalink
Update index.ipynb due to TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
bpurdy-ds authored Aug 16, 2024
1 parent a4f5877 commit eaa737a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,18 @@
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"# convert feature names to strings so there is not a TypeError with sklearn\n",
"\n",
"X_train_tr.columns = X_train_tr.columns.astype(str)\n",
"X_test_tr.columns = X_test_tr.columns.astype(str)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.linear_model import LinearRegression\n",
"linreg = LinearRegression()\n",
Expand All @@ -1466,7 +1478,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1476,7 +1488,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 21,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1506,7 +1518,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1547,7 +1559,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 23,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit eaa737a

Please sign in to comment.