📅  最后修改于: 2022-03-11 14:45:54.866000             🧑  作者: Mango
from sklearn.preprocessing import LabelEncoder
lb_make = LabelEncoder()
obj_df["make_code"] = lb_make.fit_transform(obj_df["make"])
obj_df[["make", "make_code"]].head(11)