pandas.unique
pandas 3.1.1 · General functions · function
Get distinct values in encounter order without sorting.
Call syntax
pd.unique(values)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
values |
Required Positional or keyword |
1d array-like Supply values to transform, match, aggregate, or use as data. |
Returns
Index, ExtensionArray or numpy.ndarray