PySpark Interview Questions and Answers
Question: Explain the difference between 'cache' and 'persist' operations in PySpark.Answer: 'Cache' is a shorthand for 'persist(memory_only=True)', while 'persist' allows more flexibility by specifying storage levels (memory-only, disk-only, etc.).Example:
|
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: