📅  最后修改于: 2022-03-11 14:45:10.687000             🧑  作者: Mango
from sklearn import preprocessing
lab_encoder = preprocessing.LabelEncoder()
df['column'] = lab_encoder.fit_transform(df['column'])