#Intro
If you're dealing with categorical variables, it's highly valuable to have:
- Number representations for the category (so you can do things like
sklearn
algorithms) - A dictionary mapping of the numbers to the categories (for
groupby
and other such methods)
I couldn't find something built-in, but the solve is pretty easy (and sexy), and a on-liner