text_plain_output_1.png
from sklearn.preprocessing import LabelEncoder

from sklearn.preprocessing import LabelEncoder

from sklearn.preprocessing import LabelEncoder

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/chocolate-bar-ratings/chocolate_bars.csv')

data.isnull().sum()

data.isnull().sum()

from sklearn.preprocessing import LabelEncoder
En = LabelEncoder()
Enco = En.fit_transform(data['bean_origin'])
data.drop('bean_origin', axis=1, inplace=True)
data['bean_origin'] = Enco

data.isnull().sum()

from sklearn.preprocessing import LabelEncoder
En = LabelEncoder()
E = En.fit_transform(data['ingredients'])
data.drop('ingredients', axis=1, inplace=True)
data['ingredients'] = E

from sklearn.preprocessing import LabelEncoder
En = LabelEncoder()
lb = En.fit_transform(data['review'])
data.drop('review', axis=1, inplace=True)
data['review'] = lb

from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
l = le.fit_transform(data['manufacturer'])
data.drop('manufacturer', axis=1, inplace=True)
data['manufacturer'] = l

data.head()