Return Series of unique values in the object. Includes NA values. Returns ------- uniques : Series Notes ----- Unlike :meth:`pandas.Series.unique`, the order of the returned values is not guaranteed to match the order of first appear
(self, split_every=None, split_out=True, shuffle_method=None)
| 4343 | return new_collection(MemoryUsageFrame(self, deep=deep, _index=index)) |
| 4344 | |
| 4345 | def unique(self, split_every=None, split_out=True, shuffle_method=None): |
| 4346 | """ |
| 4347 | Return Series of unique values in the object. Includes NA values. |
| 4348 | |
| 4349 | Returns |
| 4350 | ------- |
| 4351 | uniques : Series |
| 4352 | |
| 4353 | Notes |
| 4354 | ----- |
| 4355 | Unlike :meth:`pandas.Series.unique`, the order of the returned |
| 4356 | values is not guaranteed to match the order of first appearance |
| 4357 | in the data, because ``unique`` shuffles the data under the hood |
| 4358 | to avoid overloading a single worker. To preserve the original |
| 4359 | order, pass ``split_out=1`` to use a tree reduction instead |
| 4360 | (only suitable for low-cardinality data). |
| 4361 | """ |
| 4362 | shuffle_method = _get_shuffle_preferring_order(shuffle_method) |
| 4363 | return new_collection(Unique(self, split_every, split_out, shuffle_method)) |
| 4364 | |
| 4365 | @derived_from(pd.Series) |
| 4366 | def nunique(self, dropna=True, split_every=False, split_out=True): |