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

Index class deprecation enforcements #13204

Merged

Conversation

galipremsagar
Copy link
Contributor

@galipremsagar galipremsagar commented Apr 24, 2023

Description

This PR:

  • Enforces Index related deprecations by removing Float32Index, Float64Index, GenericIndex, Int8Index, Int16Index, Int32Index, Int64Index, StringIndex, UInt8Index, UInt16Index, UInt32Index, UInt64Index.
  • Cleans up the repr logic to more closely align with pandas for <NA> value representation incase of string dtype.
  • Fixes docstring and pytests to support the removals of the above classes.

This PR also fixes 202 pytests:

= 267 failed, 95670 passed, 2044 skipped, 763 xfailed, 300 xpassed in 442.18s (0:07:22) =

On pandas_2.0_feature_branch:

= 469 failed, 95464 passed, 2044 skipped, 763 xfailed, 300 xpassed in 469.26s (0:07:49) =

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 self-assigned this Apr 24, 2023
@github-actions github-actions bot added the Python Affects Python cuDF API. label Apr 24, 2023
@galipremsagar galipremsagar changed the title [WIP] POC for Index deprecation enforcements [REVIEW] Index class deprecation enforcements Apr 24, 2023
@galipremsagar galipremsagar added improvement Improvement / enhancement to an existing function breaking Breaking change labels Apr 24, 2023
@galipremsagar galipremsagar marked this pull request as ready for review April 24, 2023 22:51
@galipremsagar galipremsagar requested review from a team as code owners April 24, 2023 22:51
@galipremsagar galipremsagar requested review from isVoid, charlesbluca and shwina and removed request for a team April 24, 2023 22:51
python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/multiindex.py Outdated Show resolved Hide resolved
python/cudf/cudf/testing/testing.py Outdated Show resolved Hide resolved
python/cudf/cudf/testing/testing.py Outdated Show resolved Hide resolved
@galipremsagar galipremsagar changed the title [REVIEW] Index class deprecation enforcements Index class deprecation enforcements Apr 26, 2023
```
Integer, float, or string indexes are all composed of a single column of data.
Most `GenericIndex` methods are inherited from `Frame`, saving us the trouble of rewriting them.
Most `Index` methods are inherited from `Frame`, saving us the trouble of rewriting them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is point 3 below (Index is a factory class) still correct with these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Updated it. Let me know if you think it needs more clarification.

python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/index.py Show resolved Hide resolved
@galipremsagar galipremsagar requested a review from wence- May 18, 2023 14:20
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galipremsagar galipremsagar merged commit 258bf3d into rapidsai:pandas_2.0_feature_branch May 30, 2023
@bdice
Copy link
Contributor

bdice commented May 30, 2023

@galipremsagar Do any of these fixes need backported to branch-23.08 for pandas 1.x compatibility, or is that unnecessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change improvement Improvement / enhancement to an existing function Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants