DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #110
The code block shown below should return a collection of summary statistics for column sqft in DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code…
The correct answer is D. 1. describe. DataFrame.describe(*cols) returns a summary DataFrame with statistics including count, mean, standard deviation, min, and max for the specified numeric or string columns. Calling storesDF.describe('sqft') returns these five summary statistics for the sqft column. While…
Question
The code block shown below should return a collection of summary statistics for column sqft in DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block:
storesDF.1(2)
Options
- A
- summary
- B
- describe
- C
- summary
- D
- describe
- E
- summary
How the community answered
(50 responses)- A4% (2)
- C6% (3)
- D88% (44)
- E2% (1)
Explanation
DataFrame.describe(*cols) returns a summary DataFrame with statistics including count, mean, standard deviation, min, and max for the specified numeric or string columns. Calling storesDF.describe('sqft') returns these five summary statistics for the sqft column. While summary() also exists and returns additional statistics (including quartiles like 25%, 50%, 75%), the answer key identifies describe as the correct fill-in for blank 1 and 'sqft' for blank 2. The full expression is: storesDF.describe('sqft').
Topics
Community Discussion
No community discussion yet for this question.