Databricks Certified Associate Developer for Apache Spark — Question 109
Which of the following DataFrame operations is classified as a transformation?
Answer options
- A. DataFrame.select()
- B. DataFrame.count()
- C. DataFrame.show()
- D. DataFrame.first()
- E. DataFrame.collect()
Correct answer: A
Explanation
The correct answer is A, as DataFrame.select() creates a new DataFrame based on the specified columns, which is a transformation operation. The other options such as DataFrame.count(), DataFrame.show(), DataFrame.first(), and DataFrame.collect() are actions that return values or display data, rather than transforming the DataFrame itself.