mars.dataframe.Series.nunique#
- Series.nunique(dropna=True, combine_size=None)#
Return number of unique elements in the object.
Excludes NA values by default.
- 参数
- 返回类型
参见
DataFrame.nunique
Method nunique for DataFrame.
Series.count
Count non-NA/null observations in the Series.
示例
>>> import mars.dataframe as md >>> s = md.Series([1, 3, 5, 7, 7]) >>> s.execute() 0 1 1 3 2 5 3 7 4 7 dtype: int64
>>> s.nunique().execute() 4