QuestionQ148

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks returns every row from the DataFrame storesDF?

Explanation

DataFrame.collect() returns all records in a PySpark DataFrame as a list of Row objects. It should be used only when the complete result is small enough to fit in the driver’s memory.

Learn more

Community Discussion

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