@@ -709,7 +709,7 @@ def values(self):
709
709
710
710
@property
711
711
def _values (self ):
712
- # type: () -> Union[ExtensionArray, Index]
712
+ # type: () -> Union[ExtensionArray, Index, np.ndarray ]
713
713
# TODO(EA): remove index types as they become extension arrays
714
714
"""The best array representation.
715
715
@@ -721,18 +721,14 @@ def _values(self):
721
721
722
722
It may differ from the public '.values' method.
723
723
724
- index | values | _values | _ndarray_values |
725
- ----------------- | -------------- -| ----------- | --------------- |
726
- CategoricalIndex | Categorical | Categorical | codes |
727
- DatetimeIndex[tz] | ndarray[M8ns] | DTI[tz] | ndarray[M8ns] |
728
-
729
- For the following, the ``._values`` is currently ``ndarray[object]``,
730
- but will soon be an ``ExtensionArray``
731
-
732
- index | values | _values | _ndarray_values |
733
- ----------------- | --------------- | ------------ | --------------- |
734
- PeriodIndex | ndarray[object] | ndarray[obj] | ndarray[int] |
735
- IntervalIndex | ndarray[object] | ndarray[obj] | ndarray[object] |
724
+ index | values | _values | _ndarray_values |
725
+ ----------------- | --------------- | ------------- | --------------- |
726
+ Index | ndarray | ndarray | ndarray |
727
+ CategoricalIndex | Categorical | Categorical | ndarray[int] |
728
+ DatetimeIndex | ndarray[M8ns] | ndarray[M8ns] | ndarray[M8ns] |
729
+ DatetimeIndex[tz] | ndarray[M8ns] | DTI[tz] | ndarray[M8ns] |
730
+ PeriodIndex | ndarray[object] | PeriodArray | ndarray[int] |
731
+ IntervalIndex | IntervalArray | IntervalArray | ndarray[object] |
736
732
737
733
See Also
738
734
--------
0 commit comments