cudf.DatetimeIndex.month#

property DatetimeIndex.month[source]#

The month as January=1, December=12.

Examples

>>> import cudf
>>> import pandas as pd
>>> datetime_index = cudf.Index(pd.date_range("2000-01-01",
...             periods=3, freq="M"))
>>> datetime_index
DatetimeIndex(['2000-01-31', '2000-02-29', '2000-03-31'], dtype='datetime64[ns]')
>>> datetime_index.month
Index([1, 2, 3], dtype='int16')