Câu 8: Databricks Certified Associate Developer for Apache Spark
The code block shown contains an error. The code block is intended to return a new DataFrame where column sqft from DataFrame storesDF has had its missing values replaced with the value 30,000. Identify the error. A sample of DataFrame storesDF is displayed below: Code block:storesDF.na.fill(30000, col("sqft"))
Nội dung câu hỏi
The code block shown contains an error. The code block is intended to return a new DataFrame where column sqft from DataFrame storesDF has had its missing values replaced with the value 30,000. Identify the error. A sample of DataFrame storesDF is displayed below: Code block:storesDF.na.fill(30000, col("sqft"))
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 argument to the subset parameter of fill() should be a string column name or a list of string column names rather than a Column object. — đáp án hiện tại
- B. The na.fill() operation does not work and should be replaced by the dropna() operation.
- C. he argument to the subset parameter of fill() should be a the numerical position of the column rather than a Column object.
- D. The na.fill() operation does not work and should be replaced by the nafill() operation.
- E. The na.fill() operation does not work and should be replaced by the fillna() operation.
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.