Skip to content

BUG: Series.cumin/cummax fails with datetime64[ns, tz] dtype #15553

Closed
@jreback

Description

@jreback
  • .where
  • .combine_first
  • .update
  • .cummin/cummax

works with naive dt, should work with tz-aware

In [40]: s = Series(pd.date_range('20130101', periods=2))

In [41]: s.where(s>s,s)
Out[41]: 
0   2013-01-01
1   2013-01-02
dtype: datetime64[ns]

In [42]: s = Series(pd.date_range('20130101', periods=2, tz='US/Eastern'))

In [43]: s.where(s>s,s)
TypeError: invalid type promotion
TypeError: Could not operate [array(['2013-01-01T05:00:00.000000000', '2013-01-02T05:00:00.000000000'], dtype='datetime64[ns]')] with block values [invalid type promotion]

Metadata

Metadata

Assignees

Labels

BugIndexingRelated to indexing on series/frames, not to indexes themselvesTimezonesTimezone data dtype

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions