📜  pyspark datetime add hours - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:18.208000             🧑  作者: Mango

代码示例1
# PYSPARK DATAFRAME API

from pyspark.sql.functions import unix_timestamp

df.select((unix_timestamp(df.timestamp_col) + 3600).cast('timestamp'))
# 1 hour = 60 seconds x 60 minutes = 3600 seconds