Skip to content
DEA
Data Processing & Transformations
easy
Question 10 of 62

A data engineer wants to add a new column discounted_price to a PySpark DataFrame df that equals price * 0.9. Which PySpark method should they use?

Adf.createTempView(\discounted_price\)
Bdf.withColumn(\discounted_price\, col(\price\) * 0.9)
Cdf.select(col(\price\) * 0.9)
Ddf.rename(\price\, \discounted_price\)

Educational Content — CertQnA practice questions are written against official exam objectives, covering the same domains tested on the real exam. All content is original and independent — not actual exam questions, not affiliated with any certification vendor. Learn more about our content policy

Discussion

Be the first to share your understanding of this concept

⚠️ Discussion is for concept clarification only. Do not share or request actual exam questions or answers.

Sign in to join the discussion