Which of the following code blocks returns the number of rows in DataFrame storesDF for each distinct combination of values in column division and column storeCategory?
A.
storesDF.groupBy(Seq(col(“division”), col(“storeCategory”))).count()
B.
storesDF.groupBy(division, storeCategory).count()
C.
storesDF.groupBy(“division”, “storeCategory”).count()
D.
storesDF.groupBy(“division”).groupBy(“StoreCategory”).count()
E.
storesDF.groupBy(Seq(“division”, “storeCategory”)).count()
C. storesDF.groupBy(“division”, “storeCategory”).count()
upvoted 1 times
...
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.
Sowwy1
7 months, 4 weeks ago