# dask.dataframe.Series.cat.add_categories

#### dataframe.Series.cat.add_categories(new_categories) → Self

Add new categories.

This docstring was copied from pandas.core.arrays.categorical.CategoricalAccessor.add_categories.

Some inconsistencies with the Dask version may exist.

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

* **Parameters:**
  **new_categories**
  : The new categories to be included.
* **Returns:**
  Categorical
  : Categorical with new categories added.
* **Raises:**
  ValueError
  : If the new categories include old categories or do not validate as
    categories

#### SEE ALSO
[`rename_categories`](dask.dataframe.Series.cat.rename_categories.html.md#dask.dataframe.Series.cat.rename_categories)
: Rename categories.

[`reorder_categories`](dask.dataframe.Series.cat.reorder_categories.html.md#dask.dataframe.Series.cat.reorder_categories)
: Reorder categories.

[`remove_categories`](dask.dataframe.Series.cat.remove_categories.html.md#dask.dataframe.Series.cat.remove_categories)
: Remove the specified categories.

[`remove_unused_categories`](dask.dataframe.Series.cat.remove_unused_categories.html.md#dask.dataframe.Series.cat.remove_unused_categories)
: Remove categories which are not used.

[`set_categories`](dask.dataframe.Series.cat.set_categories.html.md#dask.dataframe.Series.cat.set_categories)
: Set the categories to the specified ones.

### Examples

```pycon
>>> c = pd.Categorical(["c", "b", "c"])
>>> c
['c', 'b', 'c']
Categories (2, str): ['b', 'c']
```

```pycon
>>> c.add_categories(["d", "a"])
['c', 'b', 'c']
Categories (4, str): ['b', 'c', 'd', 'a']
```

<!-- !! processed by numpydoc !! -->
