QuestionQ9
VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.The code block below contains an error. It is intended to return the exact number of distinct values in the division column in DataFrame storesDF. Identify the error.
Code block:
storesDF.agg(approx_count_distinct(col(“division”)).alias(“divisionDistinct”))
Community Discussion