I am trying to turn that number from a dataframe into a datetime, the colum time['date'] looks like the following:
0 1.575263e+12
1 1.575263e+12
2 1.575263e+12
3 1.575263e+12
4 1.575307e+12
...
95 1.576521e+12
96 1.576521e+12
97 1.576521e+12
98 1.576521e+12
99 1.576521e+12
Name: date, Length: 100, dtype: float64
I tried the following:
print(pd.to_datetime(time['date'], unit='s'))
But I had the issue in the title, and if I try without unit='s'
the column looks as follow:
0 1970-01-01 00:26:15.262698000
1 1970-01-01 00:26:15.262699000
2 1970-01-01 00:26:15.262698000
3 1970-01-01 00:26:15.262701000
4 1970-01-01 00:26:15.307111000
...
95 1970-01-01 00:26:16.521124623
96 1970-01-01 00:26:16.521116000
97 1970-01-01 00:26:16.521118000
98 1970-01-01 00:26:16.521145701
99 1970-01-01 00:26:16.521147000
Name: date, Length: 100, dtype: datetime64[ns]
Which is of course wrong, any idea why? thanks!
Here is an example of the input: 1575262698000.0
and the output should be the following: 2019-12-02 04:58:18