CLN: fix py2to3 issues in categorical.py