-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: Unnecessary hash table with RangeIndex #16685
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
Comments
hmm ,this should not be creating a hash table at all (though it would if it morphed to an int64index) |
The pandas/pandas/core/indexes/range.py Line 43 in 2e24a8f
|
I think that |
Related to this, I just stumbled on the fact that currenlty And given that the actual engine takes a lot more memory as the values (for int64index it is 5x more memory on an example case 500k range-like int index), a |
This is true, but I think it would be relatively rare for the engine to populated when a |
Example
Rather than materializing the hash table, should directly convert labels into positions. Low priority in my opinion, atypical to be using
loc
with aRangeIndex
.pandas 0.20.2
The text was updated successfully, but these errors were encountered: