10000 REGR: Index.union should pick correct dtype for combinations of tstamps with different tzones · Issue #28034 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
REGR: Index.union should pick correct dtype for combinations of tstamps with different tzones #28034
Closed
@zogzog

Description

@zogzog

Here's a pdb session showing the issue:

ipdb> basei
DatetimeIndex(['2017-10-28 23:00:00+00:00', '2017-10-29 00:00:00+00:00',
               '2017-10-29 01:00:00+00:00', '2017-10-29 02:00:00+00:00'],
              dtype='datetime64[ns, UTC]', freq=None)
ipdb> diffi
DatetimeIndex(['2017-10-29 02:00:00+01:00', '2017-10-29 03:00:00+01:00',
               '2017-10-29 04:00:00+01:00', '2017-10-29 05:00:00+01:00'],
              dtype='datetime64[ns, Europe/Paris]', freq=None)
ipdb> basei.union(diffi)
Index([2017-10-28 23:00:00+00:00, 2017-10-29 00:00:00+00:00,
       2017-10-29 01:00:00+00:00, 2017-10-29 02:00:00+00:00,
       2017-10-29 04:00:00+01:00, 2017-10-29 05:00:00+01:00],
      dtype='object')

With pandas 0.24 I got back an index with a dtype='datetime64[ns, UTC]'

This looks a bit like a cousin of #26778

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexRelated to the Index class or subclassesTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0