
Ultimate access to all questions.
Which of the following code blocks creates a new DataFrame by adding a column named customerSatisfactionAbs containing the absolute values from the customerSatisfaction column in DataFrame storesDF? The customerSatisfactionAbs column does not exist in the original storesDF.
A
storesDF.withColumn(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”)))
B
storesDF.withColumnRenamed(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”)))
C
storesDF.withColumn(col(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”))))
D
storesDF.withColumn(“customerSatisfactionAbs”, abs(col(customerSatisfaction)))