Skip to content

DEPR: remove Int/Uint/Float64Index from pandas/tests/indexing & pandas/tests/series #50781

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

Conversation

topper-123
Copy link
Contributor

Extraction of part of #50479. Progress towards #42717.

@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Jan 17, 2023
@topper-123 topper-123 force-pushed the remove_int64_uint64_float64_index_indexing_series_tests branch from 7e27bf4 to 638931a Compare January 19, 2023 08:08
@@ -4864,11 +4865,11 @@ def _convert_index(name: str, index: Index, encoding: str, errors: str) -> Index
atom = DataIndexableCol._get_atom(converted)

if (
isinstance(index, Int64Index)
(isinstance(index, NumericIndex) and is_integer_dtype(index))
Copy link
Member

Choose a reason for hiding this comment

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

do we need to exclude unsigned here? or non-64-bit?

Copy link
Contributor Author

@topper-123 topper-123 Jan 19, 2023

Choose a reason for hiding this comment

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

It actually makes no difference AFAIKS, because below in lines 4911:4914 there is a section for integers and floats, which returns the same IndexCol (because getattr(index, "freq", None) is None and the same for tz).

So I could either delete this line, or the section on line 4911-4914 or keep both, the result is the same. My opinion is that it would be cleanest to delete this line and handle numeric indexes in the section in lines 4911-4914.

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@mroeschke mroeschke added this to the 2.0 milestone Jan 19, 2023
@mroeschke mroeschke merged commit 05d12b5 into pandas-dev:main Jan 19, 2023
@mroeschke
Copy link
Member

Thanks @topper-123

@topper-123 topper-123 deleted the remove_int64_uint64_float64_index_indexing_series_tests branch January 19, 2023 21:31
@topper-123
Copy link
Contributor Author

Great, It's getting close now to removing Int64Index & friends. Only outstanding big issue is arithemetic with indexes with bit-size lower than 64-bit. I hope I can get that done tomorrow or saturday.

pooja-subramaniam pushed a commit to pooja-subramaniam/pandas that referenced this pull request Jan 25, 2023
…s/tests/series (pandas-dev#50781)

* remove Int/Uint/Float64Index from pandas/tests/indexing & pandas/tests/series

* fix failures

* fix failures II

* fix failures III

* make positive integers explicit

Co-authored-by: Terji Petersen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants