MEHMET BALIOGLU

UNIX Timestamp to Readable Date With One Line of Code

UNIX Timestamp to Readable Date

Pandas library’s to_datetime method easily converts UNIX timestamp to readable date format in Python.

Epoch, also known as Unix timestamps, is the number of seconds (not milliseconds!) that have elapsed since January 1, 1970 at 00:00:00 GMT.

import pandas as pd
df['time']=pd.to_datetime(df['time'], unit='ms')