def mode(self, dropna=True):
import pandas._libs.hashtable as htable<EOL>codes = self._codes<EOL>if dropna:<EOL><INDENT>good = self._codes != -<NUM_LIT:1><EOL>codes = self._codes[good]<EOL><DEDENT>codes = sorted(htable.mode_int64(ensure_int64(codes), dropna))<EOL>return self._constructor(values=codes, dtype=self.dtype, fastpath=True)<EOL>
Returns the mode(s) of the Categorical.

Always returns `Categorical` even if only one value.

Parameters
----------
dropna : bool, default True
    Don't consider counts of NaN/NaT.

    .. versionadded:: 0.24.0

Returns
-------
modes : `Categorical` (sorted)