pandas.Categorical.from_codes — pandas 0.16.2 documentation (original) (raw)

Parameters:

codes : array-like, integers

An integer array, where each integer points to a category in categories or -1 for NaN

categories : index-like

The categories for the categorical. Items need to be unique.

ordered : boolean, (default False)

Whether or not this categorical is treated as a ordered categorical. If not given, the resulting categorical will be unordered.

name : str, optional

Name for the Categorical variable.