def max(self, numeric_only=None, **kwargs):
self.check_for_ordered('<STR_LIT>')<EOL>if numeric_only:<EOL><INDENT>good = self._codes != -<NUM_LIT:1><EOL>pointer = self._codes[good].max(**kwargs)<EOL><DEDENT>else:<EOL><INDENT>pointer = self._codes.max(**kwargs)<EOL><DEDENT>if pointer == -<NUM_LIT:1>:<EOL><INDENT>return np.nan<EOL><DEDENT>else:<EOL><INDENT>return self.categories[pointer]<EOL><DEDENT>
The maximum value of the object.

Only ordered `Categoricals` have a maximum!

Raises
------
TypeError
    If the `Categorical` is not `ordered`.

Returns
-------
max : the maximum of this `Categorical`