random forest with characters in scikit-learn/python
I have a character column and numbers but I want to categorize the character column and apply a random forest classifier. I realize that there is OneHotEncoder but there is no example anywhere. So how can I categorize the characters e.g. a gender column which has 'f' and 'm' into integers like (0,1)?