mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-30 19:47:49 +01:00
Use as_frame=False when calling fetch_openml()
This commit is contained in:
@@ -84,6 +84,13 @@
|
||||
"# MNIST"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Warning:** since Scikit-Learn 0.24, `fetch_openml()` returns a Pandas `DataFrame` by default. To avoid this and keep the same code as in the book, we use `as_frame=False`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
@@ -91,7 +98,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from sklearn.datasets import fetch_openml\n",
|
||||
"mnist = fetch_openml('mnist_784', version=1)\n",
|
||||
"mnist = fetch_openml('mnist_784', version=1, as_frame=False)\n",
|
||||
"mnist.keys()"
|
||||
]
|
||||
},
|
||||
@@ -2588,7 +2595,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.8"
|
||||
"version": "3.7.9"
|
||||
},
|
||||
"nav_menu": {},
|
||||
"toc": {
|
||||
|
||||
Reference in New Issue
Block a user