Câu 63: Databricks Certified Associate Developer for Apache Spark
The code block shown below contains an error. The code block intended to create a single-column DataFrame from Scala List years which is made up of integers. Identify the error. Code block:spark.createDataset(years)
Nội dung câu hỏi
The code block shown below contains an error. The code block intended to create a single-column DataFrame from Scala List years which is made up of integers. Identify the error. Code block:spark.createDataset(years)
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. The years list should be wrapped in another list like List(years) to make clear that it is a column rather than a row.
- B. The data type is not specified – the second argument to createDataset should be IntegerType.
- C. There is no operation createDataset – the createDataFrame operation should be used instead.
- D. The result of the above is a Dataset rather than a DataFrame – the toDF operation must be called at the end. — đáp án hiện tại
- E. The column name must be specified as the second argument to createDataset.
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.