NVIDIA / NVIDIA/cudf

[BUG] Support for `DatetimeIndexResampler`, `PeriodIndexResampler` and `TimedeltaIndexResampler` is missing

Open
#20,462 0 comments 0 reactions 1 assignee Claimed by @galipremsagar View on GitHub
bug Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
Pandas returns `DatetimeIndexResampler`, `PeriodIndexResampler` and `TimedeltaIndexResampler` depending on the index type on which we are `resampling`. `cudf` right now only returns a `SeriesResampler` or `DataFrameResampler`, this needs to change to match to pandas. This is the cause of failures in `pandas-testing/pandas-tests/tests/resample/test_resample_api.py` and many other tests.

**Steps/Code to reproduce bug**
```ipython
[1]: import cudf
irmpo
In [2]: index = cudf.date_range(start="2001-01-01", periods=10, freq="1T")

In [3]: sr = cudf.Series(range(10), index=index)

In [4]: sr.resample("3T")
Out[4]:

In [5]: sr.to_pandas().resample("3T")
Out[5]:
```
**Expected behavior**
Match pandas behavior.

**Environment overview (please complete the following information)**
- Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
- Method of cuDF install: [conda, Docker, or from source]
- If method of install is [Docker], provide `docker pull` & `docker run` commands used

**Environment details**
Please run and paste the output of the `cudf/print_env.sh` script here, to gather any other relevant environment details

**Additional context**
Add any other context about the problem here.

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.