-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasNon-Nanodatetime64/timedelta64 with non-nanosecond resolutiondatetime64/timedelta64 with non-nanosecond resolution
Description
Timestamps always get returned in nanoseconds regardless of the unit I specify:
import numpy as np, pandas as pd
np.datetime64("2018-01-01").astype("datetime64[s]").astype(int)
>>> 1514764800
pd.Series(np.datetime64("2018-01-01")).astype("datetime64[s]")
0 2018-01-01
dtype: datetime64[ns]
pd.Series(np.datetime64("2018-01-01")).astype("datetime64[s]").astype(int)
0 1514764800000000000
dtype: int64
Metadata
Metadata
Assignees
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasNon-Nanodatetime64/timedelta64 with non-nanosecond resolutiondatetime64/timedelta64 with non-nanosecond resolution