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

Câu 94: 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 from DataFrame storesDF where column storeId is of the type string. Identify the error. Code block:storesDF.withColumn(“storeId”, cast(col(“storeId”), StringType()))

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 from DataFrame storesDF where column storeId is of the type string. Identify the error. Code block:storesDF.withColumn(“storeId”, cast(col(“storeId”), StringType()))

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. Calls to withColumn() cannot create a new column of the same name on which it is operating.
  2. B. DataFrame columns cannot be converted to a new type inside of a call to withColumn().
  3. C. The call to StringType should not be followed by parentheses.
  4. D. The column name storeId inside the col() operation should not be quoted.
  5. E. The cast() operation is a method in the Column class rather than a standalone function. — đá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.

Câu hỏi liền kề