@@ -609,9 +609,10 @@ def view(self, cls=None):
609
609
610
610
def astype (self , dtype , copy = True ):
611
611
"""
612
- Create an Index with values cast to dtypes. The class of a new Index
613
- is determined by dtype. When conversion is impossible, a ValueError
614
- exception is raised.
612
+ Create an Index with values cast to dtypes.
613
+
614
+ The class of a new Index is determined by dtype. When conversion is
615
+ impossible, a ValueError exception is raised.
615
616
616
617
Parameters
617
618
----------
@@ -2197,8 +2198,9 @@ def dropna(self, how="any"):
2197
2198
2198
2199
def unique (self , level = None ):
2199
2200
"""
2200
- Return unique values in the index. Uniques are returned in order
2201
- of appearance, this does NOT sort.
2201
+ Return unique values in the index.
2202
+
2203
+ Unique values are returned in order of appearance, this does NOT sort.
2202
2204
2203
2205
Parameters
2204
2206
----------
@@ -2675,8 +2677,7 @@ def intersection(self, other, sort=False):
2675
2677
2676
2678
def difference (self , other , sort = None ):
2677
2679
"""
2678
- Return a new Index with elements from the index that are not in
2679
- `other`.
2680
+ Return a new Index with elements of index not in `other`.
2680
2681
2681
2682
This is the set difference of two Index objects.
2682
2683
@@ -3271,8 +3272,7 @@ def _can_reindex(self, indexer):
3271
3272
3272
3273
def reindex (self , target , method = None , level = None , limit = None , tolerance = None ):
3273
3274
"""
3274
- Create index with target's values (move/add/delete values
3275
- as necessary).
3275
+ Create index with target's values.
3276
3276
3277
3277
Parameters
3278
3278
----------
@@ -4253,8 +4253,7 @@ def equals(self, other: Any) -> bool:
4253
4253
4254
4254
def identical (self , other ) -> bool :
4255
4255
"""
4256
- Similar to equals, but check that other comparable attributes are
4257
- also equal.
4256
+ Similar to equals, but checks that object attributes and types are also equal.
4258
4257
4259
4258
Returns
4260
4259
-------
@@ -4340,8 +4339,7 @@ def asof(self, label):
4340
4339
4341
4340
def asof_locs (self , where , mask ):
4342
4341
"""
4343
- Find the locations (indices) of the labels from the index for
4344
- every entry in the `where` argument.
4342
+ Return the locations (indices) of labels in the index.
4345
4343
4346
4344
As in the `asof` function, if the label (a particular entry in
4347
4345
`where`) is not in the index, the latest index label up to the
@@ -4551,8 +4549,9 @@ def argsort(self, *args, **kwargs) -> np.ndarray:
4551
4549
4552
4550
def get_value (self , series : "Series" , key ):
4553
4551
"""
4554
- Fast lookup of value from 1-dimensional ndarray. Only use this if you
4555
- know what you're doing.
4552
+ Fast lookup of value from 1-dimensional ndarray.
4553
+
4554
+ Only use this if you know what you're doing.
4556
4555
4557
4556
Returns
4558
4557
-------
@@ -4905,8 +4904,9 @@ def _get_string_slice(self, key: str_t, use_lhs: bool = True, use_rhs: bool = Tr
4905
4904
4906
4905
def slice_indexer (self , start = None , end = None , step = None , kind = None ):
4907
4906
"""
4908
- For an ordered or unique index, compute the slice indexer for input
4909
- labels and step.
4907
+ Compute the slice indexer for input labels and step.
4908
+
4909
+ Index needs to be ordered and unique.
4910
4910
4911
4911
Parameters
4912
4912
----------
0 commit comments