dask.dataframe.Series.nunique
dask.dataframe.Series.nunique¶
- Series.nunique(split_every=None, dropna=True)[source]¶
Return number of unique elements in the object.
This docstring was copied from pandas.core.series.Series.nunique.
Some inconsistencies with the Dask version may exist.
Excludes NA values by default.
- Parameters
- dropnabool, default True
Don’t include NaN in the count.
- Returns
- int
See also
DataFrame.nunique
Method nunique for DataFrame.
Series.count
Count non-NA/null observations in the Series.
Examples
>>> s = pd.Series([1, 3, 5, 7, 7]) >>> s 0 1 1 3 2 5 3 7 4 7 dtype: int64
>>> s.nunique() 4