Why does sklearn preprocessing LabelEncoder inverse_transform apply from only one column?
问题 I have a random forest model built with sklearn. The model is built in one file, and I have a second file where I use joblib to load the model and apply it to new data. The data has categorical fields that are converted via sklearn's preprocessing LabelEncoder.fit_transform . Once the prediction is made, I am attempting to reverse this conversion with LabelEncoder.inverse_transform . Here is the code: #transform the categorical rf inputs df["method"] = le.fit_transform(df["method"]) df[