text_plain_output_1.png
from sklearn.preprocessing import LabelEncoder

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('../input/mushrooms.csv')

data.shape

from sklearn.preprocessing import LabelEncoder
lbl = LabelEncoder()

for col in data.columns:
    data[col] = lbl.fit_transform(data[col])

y = data['class']
x = data.iloc[:, 1:23]

x.shape