pandas.core.categorical.Categorical.fillna

Categorical.fillna(fill_value=None, method=None, limit=None, **kwargs)

Fill NA/NaN values using the specified method.

Parameters :

method : {‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default None

Method to use for filling holes in reindexed Series pad / ffill: propagate last valid observation forward to next valid backfill / bfill: use NEXT valid observation to fill gap

value : scalar

Value to use to fill holes (e.g. 0)

limit : int, default None

Maximum size gap to forward or backward fill (not implemented yet!)

Returns :

filled : Categorical with NA/NaN filled