
Ultimate access to all questions.
Given a DataFrame df with a column event_time in string format, how would you cast this column to a timestamp using Spark? Provide the code snippet._
A
df.withColumn('event_time', to_timestamp('event_time', 'yyyy-MM-dd HH:mm:ss'))_
B
df.select(to_timestamp('event_time', 'yyyy-MM-dd HH:mm:ss'))
C
df.withColumn('event_time', col('event_time').cast('timestamp'))
D
df.select(col('event_time').cast('timestamp'))_