cudf.DatetimeIndex.weekday#

property DatetimeIndex.weekday[source]#

The day of the week with Monday=0, Sunday=6.

Examples

>>> import pandas as pd
>>> import cudf
>>> datetime_index = cudf.Index(pd.date_range("2016-12-31",
...     "2017-01-08", freq="D"))
>>> datetime_index
DatetimeIndex(['2016-12-31', '2017-01-01', '2017-01-02', '2017-01-03',
            '2017-01-04', '2017-01-05', '2017-01-06', '2017-01-07',
            '2017-01-08'],
            dtype='datetime64[ns]')
>>> datetime_index.weekday
Index([5, 6, 0, 1, 2, 3, 4, 5, 6], dtype='int16')