Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pyspark datetime add hours

# 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
Comment

PREVIOUS NEXT
Code Example
Python :: if keyboard.is_pressed 
Python :: smtp email template 
Python :: export_excel file python 
Python :: how to print hello world 
Python :: np.array average row 
Python :: get working directory in python 
Python :: how to import pygame 
Python :: ipython on cmd 
Python :: initialize an array in python 
Python :: how to check if python is 32 or 64 bit 
Python :: python center window 
Python :: how to create a new virtualenv 
Python :: python inf 
Python :: clear cookies selenium python 
Python :: how to create a role and give it to the author discord.py 
Python :: pil image to numpy array 
Python :: show all columns pandas jupyter notebook 
Python :: python check if string is number reges 
Python :: python get path of current file 
Python :: python read line into list 
Python :: Issue Pandas TypeError: no numeric data to plot 
Python :: pytorch detach 
Python :: pandas reorder columns by name 
Python :: palindrome rearranging python 
Python :: get title attribute beautiful soup 
Python :: create 3x3 numpy array 
Python :: python obtain data from pandas dataframe without index name 
Python :: how to close a webpage using selenium driver python 
Python :: linear congruential generator in python 
Python :: pandas set condition multi columns 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =