Better autodiscovery of categorical data
PEP8
Merge pull request #333 from ChrisBeaumont/category

CategoricalComponent autodetection