def make_category_multiindex(categories, names):
    from itertools import product
return pd.MultiIndex.from_tuples(list(product(*categories)), names=names)
Syntactic sugar for creating a pandas series with a MultiIndex