You are viewing documentation about an older version (1.22.1). View latest version

modin.pandas.Series.unique¶

Series.unique()[source]¶

Return unique values of Series object.

Uniques are returned in order of appearance. Hash table-based unique, therefore does NOT sort.

Returns:

The unique values returned as a NumPy array. See Notes.

Return type:

ndarray

See also

Series.drop_duplicates

Return Series with duplicate values removed.

unique

Top-level unique method for any 1-d array-like object.

Index.unique

Return Index with unique values from an Index object.

Notes

Returns the unique values as a NumPy array. This includes

  • Datetime with Timezone

  • IntegerNA

See Examples section.

Examples

>>> pd.Series([2, 1, 3, 3], name='A').unique()
array([2, 1, 3])
Copy
>>> pd.Series([pd.Timestamp('2016-01-01', tz='US/Eastern')
...            for _ in range(3)]).unique()
array([Timestamp('2016-01-01 00:00:00-0500', tz='UTC-05:00')],
      dtype=object)
Copy