QuestionQ219

VerifiedUsing Spark SQL

Which code block returns the row count in the storesDF DataFrame for every distinct value in the division column?

Explanation

groupBy("division") groups the DataFrame by each distinct division value, and count() on the resulting GroupedData returns the number of rows in each group.

Learn more

Community Discussion

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