6
6
import numpy as np
7
7
8
8
from pandas .compat .numpy import function as nv
9
- from pandas .util ._decorators import cache_readonly
9
+ from pandas .util ._decorators import Appender , cache_readonly
10
10
11
11
from pandas .core .dtypes .common import ensure_platform_int , is_dtype_equal
12
12
from pandas .core .dtypes .generic import ABCSeries
@@ -188,6 +188,7 @@ def __iter__(self):
188
188
def _ndarray_values (self ) -> np .ndarray :
189
189
return self ._data ._ndarray_values
190
190
191
+ @Appender (Index .dropna .__doc__ )
191
192
def dropna (self , how = "any" ):
192
193
if how not in ("any" , "all" ):
193
194
raise ValueError (f"invalid how option: { how } " )
@@ -201,6 +202,7 @@ def repeat(self, repeats, axis=None):
201
202
result = self ._data .repeat (repeats , axis = axis )
202
203
return self ._shallow_copy (result )
203
204
205
+ @Appender (Index .take .__doc__ )
204
206
def take (self , indices , axis = 0 , allow_fill = True , fill_value = None , ** kwargs ):
205
207
nv .validate_take (tuple (), kwargs )
206
208
indices = ensure_platform_int (indices )
@@ -230,6 +232,7 @@ def _get_unique_index(self, dropna=False):
230
232
result = result [~ result .isna ()]
231
233
return self ._shallow_copy (result )
232
234
235
+ @Appender (Index .astype .__doc__ )
233
236
def astype (self , dtype , copy = True ):
234
237
if is_dtype_equal (self .dtype , dtype ) and copy is False :
235
238
# Ensure that self.astype(self.dtype) is self
0 commit comments