Skip to content

Commit 0a973df

Browse files
TomAugspurgerjreback
authored andcommitted
fixup! BUG: Fixed pd.unique on array of tuples
1 parent 658f1ab commit 0a973df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/source/whatsnew/v0.20.2.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Bug Fixes
4444
- Bug in ``DataFrame.update()`` with ``overwrite=False`` and ``NaN values`` (:issue:`15593`)
4545
- Passing an invalid engine to :func:`read_csv` now raises an informative
4646
``ValueError`` rather than ``UnboundLocalError``. (:issue:`16511`)
47-
- Bug in :func:`pd.unique` on an array of tuples (:issue:`16519`)
47+
- Bug in :func:`unique` on an array of tuples (:issue:`16519`)
4848

4949

5050
- Fixed a compatibility issue with IPython 6.0's tab completion showing deprecation warnings on Categoricals (:issue:`16409`)

pandas/core/algorithms.py

+5
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ def unique(values):
328328
[b, a, c]
329329
Categories (3, object): [a < b < c]
330330
331+
An array of tuples
332+
333+
>>> pd.unique([('a', 'b'), ('b', 'a'), ('a', 'c'), ('b', 'a')])
334+
array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object)
335+
331336
See Also
332337
--------
333338
pandas.Index.unique

0 commit comments

Comments
 (0)