API: Timestamp/Timedelta resolution in __repr__ #49059
Labels
API Design
Non-Nano
datetime64/timedelta64 with non-nanosecond resolution
Timedelta
Timedelta data type
Timestamp
pd.Timestamp and associated methods
Discussed on today's call, in 2.0 Timestamp and Timedelta will support non-nanosecond resolutions, and this should probably be reflected in the repr, something like
Timestamp("2016-01-01 10:24:11.012", reso="ms")
.ATM it is possible to do
eval(repr(ts))
on a Timestamp. If we want to maintain that, we'll need to add a reso keyword (or another name, we discussed "unit" but that conflicts with the existing unit keyword) to the constructors.If we do add a reso keyword, it may make sense to add it to to_datetime, date_range, to_timedelta, timedelta_range. That would avoid the need to do reso-inference in those functions.
The text was updated successfully, but these errors were encountered: