Skip to content

BUG: Series[int] + datetime64 should raise #28080

@jbrockmendel

Description

@jbrockmendel

identified here. We handle this correctly for timedelta64, but apparently not datetime64

iser = pd.Series(range(3))
dt = np.datetime64(3, "D")

>>> iser + dt
0   1970-01-04
1   1970-01-05
2   1970-01-06

Should behave like iser + pd.Timestamp(dt):

>>> iser + pd.Timestamp(dt)
[...]
ValueError: Cannot add integral value to Timestamp without freq.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeError ReportingIncorrect or improved errors from pandas

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions