You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.nunique() and .unique() already exist on a Series, so no need to hand-roll.
I suppose .is_unique could be defined as the below.
want to do a PR?
In [9]: s = Series(np.random.randint(0,10,size=1000))
In [10]: s.nunique() == len(s)
Out[10]: False
In [11]: s = Series(np.arange(1000))
In [12]: s.nunique() == len(s)
Out[12]: True
Hello,
Series doesn't have is a
is_unique
attributeIndex have a
is_unique
attribute but not (values of a) SeriesI'm doing this
but this kind of attribute could be useful when you want to set a column as index and ensure that there is no duplicate keys.
PS: I know there is
The text was updated successfully, but these errors were encountered: