Pandas converting row with unix timestamp (in milliseconds) to datetime

You can do this as a post processing step using to_datetime and passing arg unit="ms":

In [5]:
df['UNIXTIME'] = pd.to_datetime(df['UNIXTIME'], unit="ms")
df

Out[5]:
   RUN                UNIXTIME  VALUE
0    1 2015-11-10 13:05:02.320     10
1    2 2015-11-10 13:05:02.364     20
2    3 2015-11-10 13:05:22.364     42

Leave a Comment