You can use the to_datetime
function from pandas.
First, you need to convert the matlab datenum to the number of seconds since January 1, 1970 (Unix time) using the following formula:
(matlab_datenum - 719529) * 86400
Then, you can pass this value to the to_datetime
function along with the unit
parameter set to 's' to specify that the input is in seconds.
Here's an example code:
main.py191 chars10 lines
Output:
main.py20 chars2 lines
gistlibby LogSnag