Here is a pretty complete list for how to do one-hot encoding.
It looks like the easiest might be StatsBase.indicatormat
StatsBase.indicatormat