Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ac4s65

A data analyst is working on a DataFrame named dates_df and needs to add a...

A data analyst is working on a DataFrame named dates_df and needs to add a new column, date, derived from the timestamp field.

Which code fragment should be used to extract the date from a timestamp?

A.

dates_df.withColumn( " date " , f.unix_timestamp( " timestamp " )).show()

B.

dates_df.withColumn( " date " , f.to_date( " timestamp " )).show()

C.

dates_df.withColumn( " date " , f.date_format( " timestamp " , " yyyy-MM-dd " )).show()

D.

dates_df.withColumn( " date " , f.from_unixtime( " timestamp " )).show()

Databricks-Certified-Data-Analyst-Associate PDF/Engine
  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions
buy now Databricks-Certified-Data-Analyst-Associate pdf
Get 65% Discount on All Products, Use Coupon: "ac4s65"