Help figuring out simple categorical indexing

Thanks for sharing that solution here! I like it a lot and will definitely be using that one in the future for indexing in high dims.