Câu 28: Databricks Certified Associate Developer for Apache Spark
Which of the following code blocks returns a new DataFrame where column productCategories only has one word per row, resulting in a DataFrame with many more rows than DataFrame storesDF?A sample of storesDF is displayed below:
Nội dung câu hỏi
Which of the following code blocks returns a new DataFrame where column productCategories only has one word per row, resulting in a DataFrame with many more rows than DataFrame storesDF?A sample of storesDF is displayed below:
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("productCategories", explode(col("productCategories"))) — đáp án hiện tại
- B. storesDF.withColumn("productCategories", split(col("productCategories")))
- C. storesDF.withColumn("productCategories", col("productCategories").explode())
- D. storesDF.withColumn("productCategories", col("productCategories").split())
- E. storesDF.withColumn("productCategories", explode("productCategories"))
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.