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

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

Which of the following code blocks returns a DataFrame containing a column dayOfYear, an integer representation of the day of the year from column openDate from DataFrame storesDF?Note that column openDate is of type integer and represents a date in the UNIX epoch format – the number of seconds since midnight on Janua…

Nội dung câu hỏi

Which of the following code blocks returns a DataFrame containing a column dayOfYear, an integer representation of the day of the year from column openDate from DataFrame storesDF?Note that column openDate is of type integer and represents a date in the UNIX epoch format – the number of seconds since midnight on January 1st, 1970. A sample of storesDF is displayed below:

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. (storesDF.withColumn("openTimestamp", col("openDate").cast("Timestamp")). withColumn("dayOfYear", dayofyear(col("openTimestamp")))) — đáp án hiện tại
  2. B. storesDF.withColumn("dayOfYear", get dayofyear(col("openDate")))
  3. C. storesDF.withColumn("dayOfYear", dayofyear(col("openDate")))
  4. D. (storesDF.withColumn("openDateFormat", col("openDate").cast("Date")). withColumn("dayOfYear", dayofyear(col("openDateFormat"))))
  5. E. storesDF.withColumn("dayOfYear", substr(col("openDate"), 4, 6))

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ề