Skip to content

Content Tagged "timestamp"

Page 1 of 1

Content Tagged "timestamp"

Timestamp to DateTime Serializer Field for DRF

September 29, 2017Categories: Software, Tutorial
I'm currently trying to deserialize JSON data to a Django model. This is quite straight forward for most numeric fields, but I have a DateTime field which is stored as a timestamp in the original JSON. At first, I thought I should read the timestamp as an integer and convert it through post…

Convert Timestamp to DateTime for Pandas DataFrame

August 8, 2017Categories: Software, Tutorial
To convert a pandas data frame value from unix timestamp to python datetime you need to use: where: timestamp is the column containing the timestamp value unit='s' defines the unit of the timestamp (seconds in this case) You can actually replace the column altogether: Unfortunately, the…

All tags