66import numpy as np
77
88from pandas .compat .numpy import function as nv
9- from pandas .util ._decorators import cache_readonly
9+ from pandas .util ._decorators import Appender , cache_readonly
1010
1111from pandas .core .dtypes .common import ensure_platform_int , is_dtype_equal
1212from pandas .core .dtypes .generic import ABCSeries
@@ -188,6 +188,7 @@ def __iter__(self):
188188 def _ndarray_values (self ) -> np .ndarray :
189189 return self ._data ._ndarray_values
190190
191+ @Appender (Index .dropna .__doc__ )
191192 def dropna (self , how = "any" ):
192193 if how not in ("any" , "all" ):
193194 raise ValueError (f"invalid how option: { how } " )
@@ -201,6 +202,7 @@ def repeat(self, repeats, axis=None):
201202 result = self ._data .repeat (repeats , axis = axis )
202203 return self ._shallow_copy (result )
203204
205+ @Appender (Index .take .__doc__ )
204206 def take (self , indices , axis = 0 , allow_fill = True , fill_value = None , ** kwargs ):
205207 nv .validate_take (tuple (), kwargs )
206208 indices = ensure_platform_int (indices )
@@ -230,6 +232,7 @@ def _get_unique_index(self, dropna=False):
230232 result = result [~ result .isna ()]
231233 return self ._shallow_copy (result )
232234
235+ @Appender (Index .astype .__doc__ )
233236 def astype (self , dtype , copy = True ):
234237 if is_dtype_equal (self .dtype , dtype ) and copy is False :
235238 # Ensure that self.astype(self.dtype) is self
0 commit comments