Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.Series.cat.codes#

Series.cat.codes[source]#

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

[8]ページ先頭

©2009-2025 Movatter.jp