Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the difference between a DataFrame and an RDD in PySpark?
Answer: DataFrame is a higher-level abstraction on top of RDD, providing a structured and tabular representation of data. It supports various optimizations and operations similar to SQL.

Example:

df = spark.createDataFrame([(1, 'John'), (2, 'Jane')], ['ID', 'Name'])
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook