Skip to content

Commit

Permalink
n_unique returns_scalar=True
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Jan 10, 2025
1 parent 82718f7 commit 0e1f345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion narwhals/_spark_like/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def n_unique(self: Self) -> Self:
def _n_unique(_input: Column) -> Column:
return F.count_distinct(_input) + F.max(F.isnull(_input).cast(IntegerType()))

return self._from_call(_n_unique, "n_unique", returns_scalar=self._returns_scalar)
return self._from_call(_n_unique, "n_unique", returns_scalar=True)

def is_null(self: Self) -> Self:
from pyspark.sql import functions as F # noqa: N812
Expand Down

0 comments on commit 0e1f345

Please sign in to comment.