Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 34 of 118
Free Preview · 118 of 392 · questions 1–118 of 392 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- df.cache() is shorthand for df.persist(StorageLevel.MEMORY_AND_DISK). It marks the DataFrame to be cached upon the next action (lazy). Used to reuse expensive intermediate results across actions. collect returns data to the driver; cache keeps it distributed.