pyspark.sql.functions.approx_count_distinct???

pyspark.sql.functions. approx_count_distinct 高山市 高山:列OrName, rsd:可选性[浮点万事通= )spark.sql.clumn ???

聚合函数:返回新函数列内近似异形列计数高山.

参数解析
高山 列内或字符串
rsd 可选浮点

允许最大相对标准偏差sd < 0.01使用效率更高count_distinct()

实例

>>>df.阿gg高山市approx_count_distinct高山市df.岁数).化名高山市奇数).集合(b)[Row(distinct_ages=2)]