Closed
Description
The type of Index._data
is inconsistent across Index subclasses
class | output |
---|---|
Index | ndarray |
PeriodIndex | ndarray[int] (ordinals) |
DatetimeIndex | DatetimeIndex (?) |
DatetimeIndex[tz] | ndarray[datetime64[ns]] |
CategoricalIndex | Categorical |
IntervalIndex | None |
We should replace uses of ._data
with ._values
or ._ndarray_values
, which have more consistent behavior.
I don't think we can remove ._data
entirely though. It's used for quickly setting values in some places. Haven't looked too closely though.