Published
- 1 min read
label encode one column pandas
The solution for this is noted below
label encode one column pandas
Solution
from sklearn import preprocessing
le = preprocessing.LabelEncoder()
df['label'] = le.fit_transform(df['label'])
Try other methods by searching on the site. That is if this doesn’t work