pyspark.sql.functions.sumDistinct

pyspark.sql.functions.sumDistinct(col: ColumnOrName) → pyspark.sql.column.Column[source]

Aggregate function: returns the sum of distinct values in the expression.

New in version 1.3.0.

Changed in version 3.4.0: Supports Spark Connect.

Deprecated since version 3.2.0: Use sum_distinct() instead.