QuestionQ152

Maintain a data analytics solution

You have a Fabric tenant that contains a new semantic model in OneLake.

You use a Fabric notebook to load the data into a Spark DataFrame.

You need to evaluate the data to calculate the minimum, maximum, mean, and standard deviation values for all string and numeric columns.

Solution: You use the following PySpark expression:

df.explain()  

Does this satisfy the goal?

  • A Yes
  • B No
Explanation

DataFrame.explain() prints logical and physical query plans for debugging rather than calculating data statistics. DataFrame.describe() computes count, mean, standard deviation, minimum, and maximum for all numeric and string columns when no columns are specified.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!