Closed jdaviestx closed 3 years ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Hi @jdaviestx ,
Thanks for the PR. Since Scikit-Learn 0.24, fetch_openml()
returns a Pandas DataFrame by default, instead of a NumPy array. Just pass as_frame=False
to that function and everything will work fine. I think that's the simpler solution.
Hope this helps.
When I tried to run cell 2, I got the error "KeyError: "None of [Int64Index([ 1, 21, 34, 37, 51, 56, 63, 68, 69,\n 75,\n ...\n 59910, 59917, 59927, 59939, 59942, 59948, 59969, 59973, 59990,\n 59992],\n dtype='int64', length=60000)] are in the [columns]". Apparently openml is returning a Pandas Dataframe here whereas it must have used to return a Numpy array; I had to make this change to get it to work correctly.