You are using a Python notebook in an Apache Spark pool in Azure Synapse Analytics. You need to present the data distribution statistics from a DataFrame in a tabular view. Which method should you invoke on the DataFrame?
Correct answer is Summary. Corr shows correlation between columns and it has nothing to do with data distribution statistics.
Source: https://spark.apache.org/docs/3.1.2/api/python/reference/api/pyspark.sql.DataFrame.summary.html
question returns often with different answers
however I believe it should always be summary
.describe() function takes cols:String*(columns in df) as optional args.
.summary() function takes statistics:String*(count,mean,stddev..etc) as optional args.
DataFrame.summary(*statistics)[source]
https://spark.apache.org/docs/3.1.2/api/python/reference/api/pyspark.sql.DataFrame.summary.html
It is the same question than 62 , 101 and 103. But in those cases the answer was "describe" and it's the same if you are looking for dataframe statistics detail
df.describe(['age']).show()
https://spark.apache.org/docs/3.1.1/api/python/reference/api/pyspark.sql.DataFrame.describe.html
It should definitely be summary or describe, either works. Summary shows count, mean, stddev, min, max and quartiles: https://spark.apache.org/docs/3.1.2/api/python/reference/api/pyspark.sql.DataFrame.summary.html
Describe shows count, mean, stddev, min and max: https://spark.apache.org/docs/3.1.2/api/python/reference/api/pyspark.sql.DataFrame.describe.html#pyspark.sql.DataFrame.describe
The differences seem to be that summary is newer and includes the percentiles at 25%, 50% and 75%.
This section is not available anymore. Please use the main Exam Page.DP-500 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
cherious
Highly Voted 2 years, 4 months agoper_ing
Highly Voted 2 years, 3 months agoDeloro
Most Recent 1 year, 7 months agosolref
2 years, 1 month agoThariCD
2 years, 2 months agoJuanData
2 years, 2 months agoAshwinN1992
2 years, 4 months ago