cudf.core.series.DatetimeProperties.weekday#

property DatetimeProperties.weekday: Series[source]#

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

Examples

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