Câu 43: 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 that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF. Identify the error. Code block:storesDF.unionByName(acquiredStoresDF)
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 that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF. Identify the error. Code block:storesDF.unionByName(acquiredStoresDF)
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. There is no DataFrame.unionByName() operation – the concat() operation should be used instead with both DataFrames as arguments.
- B. There are no key columns specified – similar column names should be the second argument.
- C. The DataFrame.unionByName() operation does not union DataFrames based on column position – it uses column name instead. — đáp án hiện tại
- D. The unionByName() operation is a standalone operation rather than a method of DataFrame – it should have both DataFrames as arguments.
- E. There are no column positions specified – the desired column positions should be the second argument.
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.