PERF: Index.__getitem__ should not need to do dtype inference #31903
Labels
Indexing
Related to indexing on series/frames, not to indexes themselves
Performance
Memory or execution speed performance
Currently, the
__getitem__
call in a snippet likedoes type inference when creating the new Index object (using
_shallow_copy_with_infer
), while I think we can always know for sure the result will be another Int64Index (for the above example) ?The text was updated successfully, but these errors were encountered: