def reorder_categories(self, new_categories, ordered=None, inplace=False):
inplace = validate_bool_kwarg(inplace, '<STR_LIT>')<EOL>if set(self.dtype.categories) != set(new_categories):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>return self.set_categories(new_categories, ordered=ordered,<EOL>inplace=inplace)<EOL>
Reorder categories as specified in new_categories.

`new_categories` need to include all old categories and no new category
items.

Parameters
----------
new_categories : Index-like
   The categories in new order.
ordered : bool, optional
   Whether or not the categorical is treated as a ordered categorical.
   If not given, do not change the ordered information.
inplace : bool, default False
   Whether or not to reorder the categories inplace or return a copy of
   this categorical with reordered categories.

Returns
-------
cat : Categorical with reordered categories or None if inplace.

Raises
------
ValueError
    If the new categories do not contain all old category items or any
    new ones

See Also
--------
rename_categories
add_categories
remove_categories
remove_unused_categories
set_categories