Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

label encode one column pandas

from sklearn import preprocessing
le = preprocessing.LabelEncoder()
df['label'] = le.fit_transform(df['label'])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #label #encode #column #pandas
ADD COMMENT
Topic
Name
8+1 =