CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 60: Databricks Certified Associate Developer for Apache Spark

The code block shown below contains an error. The code block is intended to return a new DataFrame where column managerName from DataFrame storesDF is split at the space character into column managerFirstName and column managerLastName. Identify the error. A sample of DataFrame storesDF is displayed below: Code block:…

Nội dung câu hỏi

The code block shown below contains an error. The code block is intended to return a new DataFrame where column managerName from DataFrame storesDF is split at the space character into column managerFirstName and column managerLastName. Identify the error. A sample of DataFrame storesDF is displayed below: Code block:storesDF.withColumn("managerFirstName", col("managerName").split(" ").getItem(0)).withColumn("managerLastName", col("managerName").split(" ").getItem(1))

Minh họa câu hỏi

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.

  1. A. The index values of 0 and 1 are not correct – they should be 1 and 2, respectively.
  2. B. The index values of 0 and 1 should be provided as second arguments to the split() operation rather than indexing the result.
  3. C. The split() operation comes from the imported functions object. It accepts a string column name and split character as arguments. It is not a method of a Column object.
  4. D. The split() operation comes from the imported functions object. It accepts a Column object and split character as arguments. It is not a method of a Column object. — đáp án hiện tại
  5. E. The withColumn operation cannot be called twice in a row.

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.

Câu hỏi liền kề