@@ -215,7 +215,7 @@ class Index(IndexOpsMixin, PandasObject):
215215 _deprecations : FrozenSet [str ] = (
216216 PandasObject ._deprecations
217217 | IndexOpsMixin ._deprecations
218- | frozenset (["contains" , "get_values" , " set_value" ])
218+ | frozenset (["contains" , "set_value" ])
219219 )
220220
221221 # To hand over control to subclasses
@@ -3753,21 +3753,18 @@ def _values(self) -> Union[ExtensionArray, ABCIndexClass, np.ndarray]:
37533753 """
37543754 return self ._data
37553755
3756- def get_values (self ):
3756+ def _internal_get_values (self ):
37573757 """
37583758 Return `Index` data as an `numpy.ndarray`.
37593759
3760- .. deprecated:: 0.25.0
3761- Use :meth:`Index.to_numpy` or :attr:`Index.array` instead.
3762-
37633760 Returns
37643761 -------
37653762 numpy.ndarray
37663763 A one-dimensional numpy array of the `Index` values.
37673764
37683765 See Also
37693766 --------
3770- Index.values : The attribute that get_values wraps.
3767+ Index.values : The attribute that _internal_get_values wraps.
37713768
37723769 Examples
37733770 --------
@@ -3780,33 +3777,24 @@ def get_values(self):
37803777 a 1 2 3
37813778 b 4 5 6
37823779 c 7 8 9
3783- >>> df.index.get_values ()
3780+ >>> df.index._internal_get_values ()
37843781 array(['a', 'b', 'c'], dtype=object)
37853782
37863783 Standalone `Index` values:
37873784
37883785 >>> idx = pd.Index(['1', '2', '3'])
3789- >>> idx.get_values ()
3786+ >>> idx._internal_get_values ()
37903787 array(['1', '2', '3'], dtype=object)
37913788
37923789 `MultiIndex` arrays also have only one dimension:
37933790
37943791 >>> midx = pd.MultiIndex.from_arrays([[1, 2, 3], ['a', 'b', 'c']],
37953792 ... names=('number', 'letter'))
3796- >>> midx.get_values ()
3793+ >>> midx._internal_get_values ()
37973794 array([(1, 'a'), (2, 'b'), (3, 'c')], dtype=object)
3798- >>> midx.get_values ().ndim
3795+ >>> midx._internal_get_values ().ndim
37993796 1
38003797 """
3801- warnings .warn (
3802- "The 'get_values' method is deprecated and will be removed in a "
3803- "future version. Use '.to_numpy()' or '.array' instead." ,
3804- FutureWarning ,
3805- stacklevel = 2 ,
3806- )
3807- return self ._internal_get_values ()
3808-
3809- def _internal_get_values (self ):
38103798 return self .values
38113799
38123800 @Appender (IndexOpsMixin .memory_usage .__doc__ )
0 commit comments