How to convert categorical variables into numerical variables in Python?