I am getting
TypeError: unhashable type: \'slice\'
when executing the below code for encoding categorical data in Python. Can a
While creating the matrix X and Y vector use values.
X
Y
values
X=dataset.iloc[:,4].values Y=dataset.iloc[:,0:4].values
It will definitely solve your problem.