Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] pandas DatetimeIndex.indexer_between_time #15380

Open
raybellwaves opened this issue Mar 23, 2024 · 6 comments
Open

[FEA] pandas DatetimeIndex.indexer_between_time #15380

raybellwaves opened this issue Mar 23, 2024 · 6 comments
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.

Comments

@raybellwaves
Copy link
Contributor

raybellwaves commented Mar 23, 2024

I watched @shwina's GTC talk (https://register.nvidia.com/flow/nvidia/gtcs24/attendeeportaldigital/page/sessioncatalog/session/1695219773174001AmnA thanks Ashwin I really enjoyed it!)

Is your feature request related to a problem? Please describe.
No. I just noticed there wasn't an issue for DatetimeIndex.indexer_between_time. I also enjoyed the user experience that %%cudf.pandas.profile points users to raise issues to highlight pandas API that falls back to CPU (https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/pandas/profiler.py#L300).

Describe the solution you'd like

import pandas as pd
pd.date_range("2023-01-01", "2023-01-02", freq="1h").indexer_between_time("09:00", "16:00")
import cudf
cudf.date_range("2023-01-01", "2023-01-02", freq="1h").indexer_between_time("09:00", "16:00")

Describe alternatives you've considered
There may be a cudf work around in the meantime for a user who needs indexer_between_time that could be captured at https://docs.rapids.ai/api/cudf/stable/cudf_pandas/

Additional context
Could create a new issue template with the "pandas" label (https://github.com/rapidsai/cudf/issues?q=is%3Aopen+is%3Aissue+label%3Apandas) to be used at https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/pandas/profiler.py#L297 fixed a bug at #15381

@raybellwaves raybellwaves added the feature request New feature or request label Mar 23, 2024
@raybellwaves raybellwaves changed the title [FEA] DatetimeIndex.indexer_between_time [FEA] pandas DatetimeIndex.indexer_between_time Mar 23, 2024
@shwina
Copy link
Contributor

shwina commented Mar 23, 2024

Thanks, @raybellwaves!

I think this could be implemented in terms of the existing datetime methods. For instance, idx.indexer_between_time('09:00', '17:00') would be 9 <= idx.dt.hour < 17 - unless I'm missing something.

This would make a great contribution if you (or anyone else) is interested in taking it on!

@shwina shwina added Python Affects Python cuDF API. good first issue Good for newcomers labels Mar 23, 2024
@srinivasyadav18
Copy link
Contributor

Hi @shwina, I would like to take up on this issue if no one has started working on this.

@shwina
Copy link
Contributor

shwina commented Apr 7, 2024

Fantastic! No one has yet so please feel free to take it on. Don't hesitate to reach out to us either here or on the RAPIDS slack if you have any questions!

@er-eis
Copy link
Contributor

er-eis commented Apr 30, 2024

@srinivasyadav18, still working on this?

@srinivasyadav18
Copy link
Contributor

@er-eis Yes, I have been trying it for few days, but could not make much progress. Please feel free to work on it!

@er-eis
Copy link
Contributor

er-eis commented May 2, 2024

sounds good, i'll take this then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.
Projects
Status: In Progress
Development

No branches or pull requests

4 participants