cudf.core.series.DatetimeProperties.days_in_month#

property DatetimeProperties.days_in_month: Series[source]#

Get the total number of days in the month that the date falls on.

Returns:
Series
Integers representing the number of days in month

Examples

>>> import pandas as pd, cudf
>>> s = cudf.Series(
...     pd.date_range(start='2000-08-01', end='2001-08-01', freq='1M'))
>>> s
0    2000-08-31
1    2000-09-30
2    2000-10-31
3    2000-11-30
4    2000-12-31
5    2001-01-31
6    2001-02-28
7    2001-03-31
8    2001-04-30
9    2001-05-31
10   2001-06-30
11   2001-07-31
dtype: datetime64[ns]
>>> s.dt.days_in_month
0     31
1     30
2     31
3     30
4     31
5     31
6     28
7     31
8     30
9     31
10    30
11    31
dtype: int16