-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
DEPR: Remove (Int|UInt|Float)64Index #50908
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,9 +296,6 @@ class Index(IndexOpsMixin, PandasObject): | |
TimedeltaIndex : Index of timedelta64 data. | ||
PeriodIndex : Index of Period data. | ||
NumericIndex : Index of numpy int/uint/float data. | ||
Int64Index : Index of purely int64 labels (deprecated). | ||
UInt64Index : Index of purely uint64 labels (deprecated). | ||
Float64Index : Index of purely float64 labels (deprecated). | ||
|
||
Notes | ||
----- | ||
|
@@ -498,7 +495,7 @@ def __new__( | |
|
||
klass = cls._dtype_to_subclass(arr.dtype) | ||
|
||
# _ensure_array _may_ be unnecessary once Int64Index etc are gone | ||
# _ensure_array _may_ be unnecessary once NumericIndex etc are gone | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think changing this misses the point of this comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I follow you here, could you expand? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the comment is suggesting that _ensure_array will become unnecessary |
||
arr = klass._ensure_array(arr, arr.dtype, copy=False) | ||
return klass._simple_new(arr, name) | ||
|
||
|
@@ -1026,7 +1023,7 @@ def take( | |
taken = values.take( | ||
indices, allow_fill=allow_fill, fill_value=self._na_value | ||
) | ||
# _constructor so RangeIndex->Int64Index | ||
# _constructor so RangeIndex-> Index with an int64 dtype | ||
return self._constructor._simple_new(taken, name=self.name) | ||
|
||
@final | ||
|
@@ -1097,7 +1094,7 @@ def repeat(self, repeats, axis=None): | |
nv.validate_repeat((), {"axis": axis}) | ||
res_values = self._values.repeat(repeats) | ||
|
||
# _constructor so RangeIndex->Int64Index | ||
# _constructor so RangeIndex-> Index with an int64 dtype | ||
return self._constructor._simple_new(res_values, name=self.name) | ||
|
||
# -------------------------------------------------------------------- | ||
|
@@ -6228,7 +6225,7 @@ def _maybe_cast_slice_bound(self, label, side: str_t): | |
""" | ||
|
||
# We are a plain index here (sub-class override this method if they | ||
# wish to have special treatment for floats/ints, e.g. Float64Index and | ||
# wish to have special treatment for floats/ints, e.g. NumericIndex and | ||
# datetimelike Indexes | ||
# Special case numeric EA Indexes, since they are not handled by NumericIndex | ||
|
||
|
@@ -6442,7 +6439,7 @@ def delete(self: _IndexT, loc) -> _IndexT: | |
else: | ||
res_values = values.delete(loc) | ||
|
||
# _constructor so RangeIndex->Int64Index | ||
# _constructor so RangeIndex-> Index with an int64 dtype | ||
return self._constructor._simple_new(res_values, name=self.name) | ||
|
||
def insert(self, loc: int, item) -> Index: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if these classes dont exist anymore, should we just remove these dict entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are a lot of other backward-compat stuff here also, and I think there should be a common decision for all of these that are older than some determined release version. For example, remove everything older than v1.0.
I could make a separate issue, where that is discussed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jreback any idea? i think this is pickle-related, which i usually punt on