Câu 27: Databricks Certified Associate Developer for Apache Spark
Which of the following code blocks returns a new DataFrame where column division from DataFrame storesDF has been replaced and renamed to column state and column managerName from DataFrame storesDF has been replaced and renamed to column managerFullName?
Nội dung câu hỏi
Which of the following code blocks returns a new DataFrame where column division from DataFrame storesDF has been replaced and renamed to column state and column managerName from DataFrame storesDF has been replaced and renamed to column managerFullName?
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.withColumnRenamed(["division", "state"], ["managerName", "managerFullName"])
- B. (storesDF.withColumn("state", col("division")).withColumn("managerFullName", col("managerName")))
- C. (storesDF.withColumn("state", "division").withColumn("managerFullName", "managerName"))
- D. (storesDF.withColumnRenamed("state", "division").withColumnRenamed("managerFullName", "managerName"))
- E. (storesDF.withColumnRenamed("division", "state").withColumnRenamed("managerName", "managerFullName")) — đáp án hiện tại
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.