I have pandas dataframe with tons of categorical columns, which I am planning to use in decision tree with scikit-learn. I need to convert them to numerical values (not one hot vectors). I can do it with LabelEncoder from scikit-learn. The problem is there are too many of them, and I do not want to convert them manually.What would be an easy way to automate this process.
Mass convert categorical columns in Pandas (not one-hot encoding)
scikit learn;pandas;categorical data;labels