def add_categories(self, new_categories, inplace=False):
inplace = validate_bool_kwarg(inplace, '<STR_LIT>')<EOL>if not is_list_like(new_categories):<EOL><INDENT>new_categories = [new_categories]<EOL><DEDENT>already_included = set(new_categories) & set(self.dtype.categories)<EOL>if len(already_included) != <NUM_LIT:0>:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise ValueError(msg.format(already_included=already_included))<EOL><DEDENT>new_categories = list(self.dtype.categories) + list(new_categories)<EOL>new_dtype = CategoricalDtype(new_categories, self.ordered)<EOL>cat = self if inplace else self.copy()<EOL>cat._dtype = new_dtype<EOL>cat._codes = coerce_indexer_dtype(cat._codes, new_dtype.categories)<EOL>if not inplace:<EOL><INDENT>return cat<EOL><DEDENT>
Add new categories.

`new_categories` will be included at the last/highest place in the
categories and will be unused directly after this call.

Parameters
----------
new_categories : category or list-like of category
   The new categories to be included.
inplace : bool, default False
   Whether or not to add the categories inplace or return a copy of
   this categorical with added categories.

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

Raises
------
ValueError
    If the new categories include old categories or do not validate as
    categories

See Also
--------
rename_categories
reorder_categories
remove_categories
remove_unused_categories
set_categories