pandas.factorize()
pandas.factorize
-
pandas.factorize(values, sort=False, order=None, na_sentinel=-1, size_hint=None)
-
Encode input values as an enumerated type or categorical variable
Parameters: values : ndarray (1-d)
Sequence
sort : boolean, default False
Sort by values
na_sentinel : int, default -1
Value to mark “not found”
size_hint : hint to the hashtable sizer
Returns: labels : the indexer to the original array
uniques登录查看完整内容