def get_values(self):
<EOL>if is_datetimelike(self.categories):<EOL><INDENT>return self.categories.take(self._codes, fill_value=np.nan)<EOL><DEDENT>elif is_integer_dtype(self.categories) and -<NUM_LIT:1> in self._codes:<EOL><INDENT>return self.categories.astype("<STR_LIT:object>").take(self._codes,<EOL>fill_value=np.nan)<EOL><DEDENT>return np.array(self)<EOL>
Return the values.

For internal compatibility with pandas formatting.

Returns
-------
numpy.array
    A numpy array of the same dtype as categorical.categories.dtype or
    Index if datetime / periods.