Câu 101: Databricks Certified Associate Developer for Apache Spark
The code block shown below contains an error. The code block is intended to create a single-column DataFrame from Python list years which is made up of integers. Identify the error. Code block:spark.createDataFrame(years, IntegerType)
Nội dung câu hỏi
The code block shown below contains an error. The code block is intended to create a single-column DataFrame from Python list years which is made up of integers. Identify the error. Code block:spark.createDataFrame(years, IntegerType)
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 column name must be specified.
- B. The years list should be wrapped in another list like [years] to make clear that it is a column rather than a row.
- C. There is no createDataFrame operation in spark.
- D. The IntegerType call must be followed by parentheses. — đáp án hiện tại
- E. The IntegerType call should not be present — Spark can tell that list years is full of integers.
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.