Alternatively, you can edit the code to use fetch_openml(..., as_frame=False) to use a numpy array instead of a pandas dataframe for this example. -- Olivier