Skip to content

Commit 44331de

Browse files
authored
add column.n_unique (#337)
1 parent fed1a69 commit 44331de

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/API_specification/dataframe_api/column_object.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,17 @@ def var(
750750
"""
751751
...
752752

753+
def n_unique(self, *, skip_nulls: bool = True) -> Scalar:
754+
"""Return number of unique values.
755+
756+
Notes
757+
-----
758+
If the original column(s) contain multiple `'NaN'` values, then
759+
they only count as one distinct value.
760+
Likewise for null values (if ``skip_nulls=False``).
761+
"""
762+
...
763+
753764
def cumulative_max(self) -> Self:
754765
"""Reduction returns a Column.
755766

0 commit comments

Comments
 (0)