-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add is_unique for Index & MultiIndex (#1766)
This PR proposes `is_unique` for `Index` & `MultiIndex`. Basically it's opposite to `has_duplicates` ```python >>> idx = ks.Index([1, 5, 7, 7]) >>> idx.is_unique False >>> idx = ks.Index([1, 5, 7]) >>> idx.is_unique True >>> idx = ks.Index(["Watermelon", "Orange", "Apple", ... "Watermelon"]) >>> idx.is_unique False >>> idx = ks.Index(["Orange", "Apple", ... "Watermelon"]) >>> idx.is_unique True ``` And fixed some tests to sync with pandas'.
- Loading branch information
Showing
3 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters