API: datetimeindex subtraction · Issue #9094 · pandas-dev/pandas (original) (raw)

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