Skip to content

BUG: coercion of non-M8[ns] in datetime ops #7996

Closed
@jreback

Description

@jreback
import datetime
s = pd.Series(pd.date_range('20130101',periods=3))
s-pd.Timestamp('20130101')
s-datetime.datetime(2013,1')

This fails as the datetime64 is not converted properly (because numpy datetime ops suck)

s-np.datetime64('20130101')

e.g. np.datetime64('20130101').astype('M8[ns]') is a bug, no?

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