Skip to content

REGR: Timestamp - series is failing #6648

Closed
@jreback

Description

@jreback

I think this changed when the subtraction in Timestamp was changed to be minus adding.
#6544

In [1]: s = pd.Series(pd.date_range('2012-1-1', periods=3, freq='D'))

In [2]: m = s.max()

In [3]: x = m.to_datetime()

In [4]: x - s
Out[4]: 
0   2 days
1   1 days
2   0 days
dtype: timedelta64[ns]

In [5]: m - s

TypeError: ufunc 'negative' did not contain a loop with signature matching types dtype('<M8[ns]') dtype('<M8[ns]')

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeRegressionFunctionality that used to work in a prior pandas versionTimedeltaTimedelta data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions