-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Non-Nanodatetime64/timedelta64 with non-nanosecond resolutiondatetime64/timedelta64 with non-nanosecond resolutionTimedeltaTimedelta data typeTimedelta data typeTimestamppd.Timestamp and associated methodspd.Timestamp and associated methods
Milestone
Description
import pandas as pd
import numpy as np
dt = np.datetime64("2016-01-01", "ms")
ts = pd.Timestamp(dt)
>>> ts.value
1451606400000 # <- 2.0/main
1451606400000000000 # <- 1.x
In previous versions .value has always been in nanoseconds. By changing the reso we get with some Timestamp/Timedelta inputs, we change the .value, which is technically public API.
One option would be just to document the change in .value behavior along with the other breaking changes docs.
Another would be to use e.g. ._value
internally and keep .value
as representing nanos.
Metadata
Metadata
Assignees
Labels
Non-Nanodatetime64/timedelta64 with non-nanosecond resolutiondatetime64/timedelta64 with non-nanosecond resolutionTimedeltaTimedelta data typeTimedelta data typeTimestamppd.Timestamp and associated methodspd.Timestamp and associated methods