@@ -929,19 +929,20 @@ def astype(self, dtype, copy=True):
929
929
930
930
Parameters
931
931
----------
932
- indices : list
932
+ indices : array-like
933
933
Indices to be taken.
934
934
axis : int, optional
935
935
The axis over which to select values, always 0.
936
936
allow_fill : bool, default True
937
- fill_value : bool , default None
937
+ fill_value : scalar , default None
938
938
If allow_fill=True and fill_value is not None, indices specified by
939
- -1 is regarded as NA. If Index doesn't hold NA, raise ValueError.
939
+ -1 are regarded as NA. If Index doesn't hold NA, raise ValueError.
940
940
941
941
Returns
942
942
-------
943
- numpy.ndarray
944
- Elements of given indices.
943
+ Index
944
+ An index formed of elements at the given indices. Will be the same
945
+ type as self, except for RangeIndex.
945
946
946
947
See Also
947
948
--------
@@ -950,7 +951,9 @@ def astype(self, dtype, copy=True):
950
951
"""
951
952
952
953
@Appender (_index_shared_docs ["take" ] % _index_doc_kwargs )
953
- def take (self , indices , axis = 0 , allow_fill = True , fill_value = None , ** kwargs ):
954
+ def take (
955
+ self , indices , axis : int = 0 , allow_fill : bool = True , fill_value = None , ** kwargs
956
+ ):
954
957
if kwargs :
955
958
nv .validate_take ((), kwargs )
956
959
indices = ensure_platform_int (indices )
0 commit comments