You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#8677
This PR adds `is_leap_year` for `cudf.Series.dt` and `cudf.DatetimeIndex`. Nulls in time series are treated as `NaT`s in Pandas time series and is mapped to `False` in this operation. E.g.
```python
>>> s = cudf.Series(['2020-01-01 08:00:00', None, '2021-12-31 09:00:00'], dtype='datetime64[ns]')
>>> s.dt.is_leap_year
0 True
1 False
2 False
dtype: bool
```
Authors:
- Michael Wang (https://github.com/isVoid)
Approvers:
- Ashwin Srinath (https://github.com/shwina)
URL: #8736
For feature engineering tasks, I'd like to be able to determine whether a datetime occurs in a leap year, like I can in pandas.
The text was updated successfully, but these errors were encountered: