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

Solution: Import the 'LabelEncoder, OneHotEncoder, StandardScaler' module

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

from sklearn import  OneHotEncoder

 

For more information:
Python sklearn OneHotEncoder