I have a data set with ordinal features.Each feature might have 6 to 7 levels. Based on my search for R if you have ordinal data, rpart treats ordinal and nominal differently. https://stats.stackexchange.com/questions/94502/decision-tree-splitting-factor-variables
But now I'm implementing the decision tree with Python and there nothing comparable to rpart to handle ordinal data. It seems Python sklearn does not handle categorical data well and I have to use one hot encoding. In this case, the order of level like level 1 to level 2 to level3......to level 6 will just disappear.
https://stackoverflow.com/questions/38108832/passing-categorical-data-to-sklearn-decision-tree
Any suggestions? Thanks.