You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behavior similar to np.linspace has been implemented for the regular date_range function in #20846, e.g. pd.date_range(start='2018-01-01', end='2018-01-10', periods=50).
This behavior is not supported by timedelta_range or interval_range, so it seems like it should be added for consistency with date_range.
Note that this behavior doesn't really make sense for period_range since a frequency is always required. Likewise it doesn't really make sense for bdate_range, as the only distinguishing feature from date_range is the support for custom business day logic, and the default freq being 'B', both of which imply a frequency. Doubly so for cdate_range, as it's been deprecated in favor of bdate_range.
The text was updated successfully, but these errors were encountered:
jschendel
changed the title
ENH: linspace behavior for bdate_range/timedelta_range/interval_range
ENH: linspace behavior for timedelta_range and interval_range
May 9, 2018
Thinking about this some more, I don't think this behavior makes sense for bdate_range either; the only distinguishing feature from date_range is the support for custom business day logic, and the default freq being 'B', both of which imply a frequency.
Updated the title and modified the original post accordingly.
I suppose this could be implemented easily enough for bdate_range but the linspace behavior would be identical to that of date_range.
Behavior similar to
np.linspace
has been implemented for the regulardate_range
function in #20846, e.g.pd.date_range(start='2018-01-01', end='2018-01-10', periods=50)
.This behavior is not supported by
timedelta_range
orinterval_range
, so it seems like it should be added for consistency withdate_range
.Note that this behavior doesn't really make sense for
period_range
since a frequency is always required. Likewise it doesn't really make sense forbdate_range
, as the only distinguishing feature fromdate_range
is the support for custom business day logic, and the default freq being'B'
, both of which imply a frequency. Doubly so forcdate_range
, as it's been deprecated in favor ofbdate_range
.The text was updated successfully, but these errors were encountered: