Skip to content

ENH: linspace behavior for timedelta_range and interval_range #20976

Closed
@jschendel

Description

@jschendel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions