def new_categories(categories, index):
    if index in categories:
        categories = categories.copy()
        categories['.index'] = categories.pop(index)
    return categories
Flop around index for '.index'
dataset/ETHPy150Open dask/dask/dask/dataframe/shuffle.py/new_categories