Câu 75: Databricks Certified Associate Developer for Apache Spark
Which of the following code blocks returns a new DataFrame with a new column customerSatisfactionAbs that is the absolute value of column customerSatisfaction in DataFrame storesDF? Note that column customerSatisfactionAbs is not in the original DataFrame storesDF.
Nội dung câu hỏi
Which of the following code blocks returns a new DataFrame with a new column customerSatisfactionAbs that is the absolute value of column customerSatisfaction in DataFrame storesDF? Note that column customerSatisfactionAbs is not in the original DataFrame storesDF.
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. storesDF.withColumn(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”))) — đáp án hiện tại
- B. storesDF.withColumnRenamed(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”)))
- C. storesDF.withColumn(col(“customerSatisfactionAbs”, abs(col(“customerSatisfaction”)))
- D. storesDF.withColumn(“customerSatisfactionAbs”, abs(col(customerSatisfaction)))
- E. storesDF.withColumn(“customerSatisfactionAbs”, abs(“customerSatisfaction”))
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.