Using categorical data in machine learning with python