I am getting
TypeError: unhashable type: \'slice\'
when executing the below code for encoding categorical data in Python. Can a
use Values either while creating variable X or while encoding as mentioned above
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
# dataset = pd.read_csv('50_Startups.csv')
dataset = pd.DataFrame(np.random.rand(10, 10))
y=dataset.iloc[:, 4].values
X=dataset.iloc[:, 0:4].values