NVIDIA / NVIDIA/cudf

[FEA] Supporting `timedelta64` dtypes for ceil/floor operations

Open
#9,561 2 comments 0 reactions 0 assignees View on GitHub
feature request libcudf Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
This issue is created as a follow-up to #9571 and #9554 where we add support for ceil/floor operations for `datetime64[ns]` data type. In this case, we would like additional support for `timedelta64[ns]` types as well.

**Describe the solution you'd like**
```python
import cudf
tdIndex = cudf.TimedeltaIndex(data =['4 day 8h 20min 35us 45ns', '+17:42:19.999999',
'9 day 3h 08:16:02.000055', '+22:35:25.000075'])
tdIndex.ceil(freq='T'))
```
Output:
```bash
TimedeltaIndex(['4 days 08:21:00', '0 days 17:43:00', '9 days 11:17:00',
'0 days 22:36:00'],
dtype='timedelta64[ns]', freq=None)
```

**Additional context**
Similar [to how pandas supports it](https://pandas.pydata.org/docs/reference/api/pandas.TimedeltaIndex.ceil.html?pandas.TimedeltaIndex.ceil#pandas-timedeltaindex-ceil)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.