我有一个带有产品数据的df,其模式如下
root
|-- Creator: string (nullable = true)
|-- Created_datetime: timestamp (nullable = true)
|-- Last_modified_datetime: timestamp (nullable = true)
|-- Product_name: string (nullable = true)
列 Created_datetime
如下所示
+-------------------+
| Created_datetime|
+-------------------+
|2019-10-12 17:09:18|
|2019-12-03 07:02:07|
|2020-01-16 23:10:08|
现在我想提取 Created_datetime
列。如何做到这一点?
1条答案
按热度按时间mqkwyuun1#
当你计算
timestamp
列,它会给你平均值unix timestamp (long)
价值观。把它扔回一个timestamp
: