Skip to content

Commit

Permalink
fixup! BUG: Fixed pd.unique on array of tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed May 31, 2017
1 parent 40babf0 commit 8871863
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.20.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Bug Fixes
detecting the terminal size. This fix only applies to python 3 (:issue:`16496`)
- Bug in using ``pathlib.Path`` or ``py.path.local`` objects with io functions (:issue:`16291`)
- Bug in ``DataFrame.update()`` with ``overwrite=False`` and ``NaN values`` (:issue:`15593`)
- Bug in :func:`pd.unique` on an array of tuples (:issue:`16519`)
- Bug in :func:`unique` on an array of tuples (:issue:`16519`)


- Fixed a compatibility issue with IPython 6.0's tab completion showing deprecation warnings on Categoricals (:issue:`16409`)
Expand Down
5 changes: 5 additions & 0 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ def unique(values):
[b, a, c]
Categories (3, object): [a < b < c]
An array of tuples
>>> pd.unique([('a', 'b'), ('b', 'a'), ('a', 'c'), ('b', 'a')])
array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object)
See Also
--------
pandas.Index.unique
Expand Down

0 comments on commit 8871863

Please sign in to comment.