-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
Milestone
Description
timedelta.resolution is documented as:
The smallest possible difference between non-equal timedelta objects, timedelta(microseconds=1).
while pandas.Timedelta.resolution is doc-string'd as:
return a string representing the lowest resolution that we have
In [9]: pd.Timedelta(minutes=30).resolution
Out[9]: 'T'
In [10]: timedelta(minutes=30).resolution
Out[10]: datetime.timedelta(0, 0, 1)
I think this difference should be addressed by either:
- Documenting the difference between both but also supporting
datetime.timedelta's notion of resolution inTimedelta(i.e. something that returnsTimedelta(nanoseconds=1)) - Making
Timedelta.resolutionconsistent withtimedelta.resolutionand creating a new property for "the lowest resolution" of aTimedeltainstance
Thoughts?
xref #21336