ExtensionArray.factorize(na_sentinel=-1) [source]
Encode the extension array as an enumerated type.
| Parameters: |
na_sentinel : int, default -1 Value to use in the |
|---|---|
| Returns: |
labels : ndarray An integer NumPy array that’s an indexer into the original ExtensionArray. uniques : ExtensionArray An ExtensionArray containing the unique values of Note uniques will not contain an entry for the NA value of the ExtensionArray if there are any missing values present in |
See also
pandas.factorize
pandas.factorize() offers a sort keyword as well.
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.api.extensions.ExtensionArray.factorize.html