Skip to content

API: datetimeindex subtraction #9094

Closed
@jreback

Description

@jreback

from SO and previous discussions

currently you cannot subtract 2 datetimeindexes ('-' is actually a set op). This is the ONLY valid numerical type of operation (e.g. you cannot add dti).

We current support pretty much the fully gamut of obvious ops, with dti-dti being the exception.

full list of tests are here: https://github.com/pydata/pandas/blob/master/pandas/tseries/tests/test_base.py#L434

I will propose

dti.sub(dti) to rectify this

thoughts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions