Skip to content

Unique on the datetimeindex / datetime64 array #9431

Closed
@hayd

Description

@hayd

http://stackoverflow.com/a/28357483/1240268

In [11]: dti = pd.DatetimeIndex([pd.Timestamp('2015-02-05 22:24:00+0000', tz='UTC')])

In [12]: dti.unique()
Out[12]:
<class 'pandas.tseries.index.DatetimeIndex'>
[2015-02-05 22:24:00+00:00]
Length: 1, Freq: None, Timezone: UTC

In [13]: pd.unique(dti)
Out[13]: array([1423175040000000000L], dtype=object)

In [14]: pd.unique(dti.values)
Out[14]: array([1423175040000000000L], dtype=object)

This is on 0.15.2, not checked on master.

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