
Answer-first summary for fast verification
Answer: No
The solution does NOT meet the goal because df.describe().show() does not calculate mean and standard deviation for string columns. While it provides count, min, and max for string columns, mean and standard deviation are only calculated for numeric columns. The community discussion shows conflicting opinions, but the most accurate technical understanding (supported by upvoted comments and official documentation) confirms that describe() has limitations with string columns. For string columns, it only provides count, min (first string alphabetically), and max (last string alphabetically), but cannot compute mean or standard deviation since these are mathematical operations that don't apply to string data.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a Fabric tenant containing 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 by calculating the minimum, maximum, mean, and standard deviation for all numeric and string columns.
Solution: You run the following PySpark code:
df.describe().show()
df.describe().show()
Does this solution meet the goal?
A
Yes
B
No
No comments yet.