I did not understand.
from sklearn.preprocessing import OneHotEncoder
encoder=OneHotEncoder()
USA_Housing_cat_1hot=encoder.fit_transform(USA_Housing_cat_.reshape(-1,1))
NameError Traceback (most recent call last)
in
7
8 encoder=OneHotEncoder()
----> 9 USA_Housing_cat_1hot=encoder.fit_transform(USA_Housing_cat_1hot.reshape(-1,1))
NameError: name ‘USA_Housing_cat_1hot’ is not defined
How can i fix it?
Please reply.