Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Aug 21, 2019 · 0 comments · Fixed by #28268 or #28362
Closed

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

jbrockmendel opened this issue Aug 21, 2019 · 0 comments · Fixed by #28268 or #28362
Labels
Datetime Datetime data dtype Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@jbrockmendel
Copy link
Member

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Error Reporting Incorrect or improved errors from pandas
Projects
None yet
2 participants