
Answer-first summary for fast verification
Answer: The default index is preserved and does not change.
When you convert a Spark DataFrame to a pandas-on-Spark DataFrame, the default index from the Spark DataFrame is retained in the pandas-on-Spark DataFrame. This means the default index remains unchanged, making option B the correct answer.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
What important consideration should you keep in mind regarding the default index when converting a Spark DataFrame to a pandas-on-Spark DataFrame?
A
The default index is automatically set to ‘index_col‘.
B
The default index is preserved and does not change.
C
The outcome varies based on the dataset's size.
D
A new default index is generated during the conversion.