I've been learning about decision tree from multiple resources but still not fully understanding data preprocessing step.
from https://www.youtube.com/watch?v=PHxYNGo8NcI&t=535s&ab_channel=codebasics it uses decision tree with label encoder and in another resource it says we don't need to convert categories to strings, I'm confused.
Given I have data that looks like
gender level score male 1 34 female 2 77 female 1 44
If we are using label encoder we would only need to convert gender however if that maps male = 0, female = 1 wouldn't the machine treat female > male? and if it ignores ordinality it will ignore level1 < level2 and treat as if level 1 and level 2 are same level which is not true.
What is the right preprocessing step and why?