cudf.core.series.DatetimeProperties.day_of_year#

property DatetimeProperties.day_of_year[source]#

The day of the year, from 1-365 in non-leap years and from 1-366 in leap years.

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.day_of_year
0    366
1      1
2      2
3      3
4      4
5      5
6      6
7      7
8      8
dtype: int16