CategoricalIndex.rename_categories()
pandas.CategoricalIndex.rename_categories
-
CategoricalIndex.rename_categories(*args, **kwargs)
[source] -
Renames categories.
The new categories has to be a list-like object. All items must be unique and the number of items in the new categories must be the same as the number of items in the old categories.
Parameters: new_categories : Index-like
The renamed categories.
inplace