How to Solve NameError: name 'KNNImputer' is not defined -- sklearn

Solution: Import the 'KNNImputer' module

To Solve the error, add the following line to the top of your code.

from sklearn.impute import KNNImputer

 

For more information:
Python sklearn KNNImputer