I am using Spark Structure Streaming, the code is in following:
def convert_timestamp_to_datetime(timestamp): return datetime.fromtimestamp(timestamp) def