missingpy no module named 27sklearn neighbors base 27

Solutions on MaxInterview for missingpy no module named 27sklearn neighbors base 27 by the best coders in the world

showing results for - "missingpy no module named 27sklearn neighbors base 27"
Jude
27 Aug 2020
1# Thank you AMLoucas from https://gist.github.com/betterdatascience/c455473d7445c0e7e279efe31a896e17 !!
2# Whoever is having the issue with ModuleNotFoundError: No module named 'sklearn.neighbors.base'. this is because when importing missingpy it tries to import automatically 'sklearn.neighbors.base' however in the new versions of sklearn it has been renamed to 'sklearn.neighbors._base' so we have to manually import it to work. The code snippet below does the job. You run the snippet before the import
3
4"""""""""""""""""""""""""""
5import sklearn.neighbors._base
6sys.modules['sklearn.neighbors.base'] = sklearn.neighbors._base
7"""""""""""""""""""""""""""