cudf.DatetimeIndex#

class cudf.DatetimeIndex(data=None, freq=None, tz=None, normalize=False, closed=None, ambiguous='raise', dayfirst=False, yearfirst=False, dtype=None, copy=False, name=None)#

Immutable , ordered and sliceable sequence of datetime64 data, represented internally as int64.

Parameters
dataarray-like (1-dimensional), optional

Optional datetime-like data to construct index with.

copybool

Make a copy of input.

freqstr, optional

This is not yet supported

tzpytz.timezone or dateutil.tz.tzfile

This is not yet supported

ambiguous‘infer’, bool-ndarray, ‘NaT’, default ‘raise’

This is not yet supported

nameobject

Name to be stored in the index.

dayfirstbool, default False

If True, parse dates in data with the day first order. This is not yet supported

yearfirstbool, default False

If True parse dates in data with the year first order. This is not yet supported

Returns
DatetimeIndex

Examples

>>> import cudf
>>> cudf.DatetimeIndex([1, 2, 3, 4], name="a")
DatetimeIndex(['1970-01-01 00:00:00.000000001',
               '1970-01-01 00:00:00.000000002',
               '1970-01-01 00:00:00.000000003',
               '1970-01-01 00:00:00.000000004'],
              dtype='datetime64[ns]', name='a')