Unique on the datetimeindex / datetime64 array · Issue #9431 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@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.