
Explanation:
The correct operation to return the number of rows in a DataFrame is DataFrame.count(). Option D is correct because count() is the standard Spark DataFrame action that triggers computation and returns the total row count.
numberOfRows() is not a valid DataFrame method in Apache Spark.n() is not a recognized method for counting rows in Spark.sum() aggregates numerical columns and does not count rows.countDistinct() is used for counting distinct values in columns, not total rows.
Thus, only option D is correct.Ultimate access to all questions.
No comments yet.