Site Navigation
Return Series of codes as well as the index.
Examples
>>>raw_cate=pd.Categorical(["a","b","c","a"],categories=["a","b"])>>>ser=pd.Series(raw_cate)>>>ser.cat.codes0 01 12 -13 0dtype: int8
Series.cat.codes