Skip to content

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

@galipremsagar

Description

@galipremsagar

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

[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]: <cudf.core.resample.SeriesResampler at 0x751d2e9452b0>

In [5]: sr.to_pandas().resample("3T")
Out[5]: <pandas.core.resample.DatetimeIndexResampler object at 0x751ce2789d30>

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions