-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Open
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasTimedeltaTimedelta data typeTimedelta data type
Description
Here I expected a TimedeltaIndex with 11 elements from 0 hours through 11 hours:
>>> pd.timedelta_range(0, 10, freq='H')
<class 'pandas.tseries.tdi.TimedeltaIndex'>
['0 days']
Length: 1, Freq: <Hour>
It appears that freq
is taken to refer only to the step size, not the start/stop, and the unit defaults to ns
like Timedelta itself? I think we should either:
- add a separate
unit
argument -- but this is a subtle distinction - use
freq
to also imply theunit
- raise on integer input (possibly in addition to 1?)
Similarly strange and somewhat inconsistent with the above example:
>>> pd.timedelta_range(0, 10, periods=100)
ValueError: Must specify two of start, end, or periods
Metadata
Metadata
Assignees
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasTimedeltaTimedelta data typeTimedelta data type