Câu 100: Databricks Certified Associate Developer for Apache Spark
Which of the following code blocks returns a new DataFrame with column storeReview where the pattern "End" has been removed from the end of column storeReview in DataFrame storesDF?A sample DataFrame storesDF is below:
Nội dung câu hỏi
Which of the following code blocks returns a new DataFrame with column storeReview where the pattern "End" has been removed from the end of column storeReview in DataFrame storesDF?A sample DataFrame storesDF is below:
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. storesDF.withColumn("storeReview", col("storeReview").regexp_replace(" End$", ""))
- B. storesDF.withColumn("storeReview", regexp_replace(col("storeReview"), " End$", "")) — đáp án hiện tại
- C. storesDF.withColumn("storeReview”, regexp_replace(col("storeReview"), " End$"))
- D. storesDF.withColumn("storeReview", regexp_replace("storeReview", " End$", ""))
- E. storesDF.withColumn("storeReview", regexp_extract(col("storeReview"), " End$", ""))
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.