Skip to content

Disable construction of Index when freq is set in pandas-compatibility mode - #13857

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:branch-23.10from
galipremsagar:freq_fix
Aug 12, 2023
Merged

Disable construction of Index when freq is set in pandas-compatibility mode#13857
rapids-bot[bot] merged 2 commits into
NVIDIA:branch-23.10from
galipremsagar:freq_fix

Conversation

@galipremsagar

Copy link
Copy Markdown
Contributor

Description

This PR raises an error when a cudf column/series/Index is being constructed using a pandas Index that has a freq set. This error is raised only in pandas-compatibility mode, because we will have to switch to cudf.date_range everywhere in the code base and examples, and cudf.date_range still isn't at a full feature parity with pd.date_range.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added bug Something isn't working 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. 4 - Needs cuDF (Python) Reviewer non-breaking Non-breaking change labels Aug 11, 2023
@galipremsagar galipremsagar self-assigned this Aug 11, 2023
@galipremsagar
galipremsagar requested a review from a team as a code owner August 11, 2023 20:56
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team 4 - Needs cuDF (Python) Reviewer labels Aug 11, 2023
@galipremsagar

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 989c411 into NVIDIA:branch-23.10 Aug 12, 2023
rapids-bot Bot pushed a commit that referenced this pull request Aug 16, 2023
…te_range` (#13890)

In #13857, we disabled the construction of `DatetimeIndex` & `TimedeltaIndex` when their pandas counter-parts have `freq` set. However, when `freq` is passed to `date_range`, the expectation and pandas-behavior is to return a `DateTimeIndex` with `freq` set. This isn't possible with cudf currently, hence disabled the construction of `DatetimeIndex` in this case.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #13890
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants