Skip to content

Commit f30aeef

Browse files
authored
DOC: updated core/indexes/base.py for SS06 errors (pandas-dev#34713)
1 parent 7a18c81 commit f30aeef

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

pandas/core/indexes/base.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,10 @@ def view(self, cls=None):
609609

610610
def astype(self, dtype, copy=True):
611611
"""
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.
615616
616617
Parameters
617618
----------
@@ -2197,8 +2198,9 @@ def dropna(self, how="any"):
21972198

21982199
def unique(self, level=None):
21992200
"""
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.
22022204
22032205
Parameters
22042206
----------
@@ -2675,8 +2677,7 @@ def intersection(self, other, sort=False):
26752677

26762678
def difference(self, other, sort=None):
26772679
"""
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`.
26802681
26812682
This is the set difference of two Index objects.
26822683
@@ -3271,8 +3272,7 @@ def _can_reindex(self, indexer):
32713272

32723273
def reindex(self, target, method=None, level=None, limit=None, tolerance=None):
32733274
"""
3274-
Create index with target's values (move/add/delete values
3275-
as necessary).
3275+
Create index with target's values.
32763276
32773277
Parameters
32783278
----------
@@ -4253,8 +4253,7 @@ def equals(self, other: Any) -> bool:
42534253

42544254
def identical(self, other) -> bool:
42554255
"""
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.
42584257
42594258
Returns
42604259
-------
@@ -4340,8 +4339,7 @@ def asof(self, label):
43404339

43414340
def asof_locs(self, where, mask):
43424341
"""
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.
43454343
43464344
As in the `asof` function, if the label (a particular entry in
43474345
`where`) is not in the index, the latest index label up to the
@@ -4551,8 +4549,9 @@ def argsort(self, *args, **kwargs) -> np.ndarray:
45514549

45524550
def get_value(self, series: "Series", key):
45534551
"""
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.
45564555
45574556
Returns
45584557
-------
@@ -4905,8 +4904,9 @@ def _get_string_slice(self, key: str_t, use_lhs: bool = True, use_rhs: bool = Tr
49054904

49064905
def slice_indexer(self, start=None, end=None, step=None, kind=None):
49074906
"""
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.
49104910
49114911
Parameters
49124912
----------

0 commit comments

Comments
 (0)