Skip to content

Commit 129bb98

Browse files
hb0313aquemy
authored andcommitted
fix: update describe_supported_spark.py included fix for DivideByZero (#1545)
1 parent bd5782b commit 129bb98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ydata_profiling/model/spark/describe_supported_spark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ def describe_supported_spark(
2828
n_unique = summary["value_counts"].where("count == 1").count()
2929
summary["is_unique"] = n_unique == count
3030
summary["n_unique"] = n_unique
31-
summary["p_unique"] = n_unique / count
31+
summary["p_unique"] = n_unique / count if count > 0 else 0
3232

3333
return config, series, summary

0 commit comments

Comments
 (0)