Skip to content

DOC: updated core/indexes/base.py for SS06 errors #34713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,10 @@ def view(self, cls=None):

def astype(self, dtype, copy=True):
"""
Create an Index with values cast to dtypes. The class of a new Index
is determined by dtype. When conversion is impossible, a ValueError
exception is raised.
Create an Index with values cast to dtypes.

The class of a new Index is determined by dtype. When conversion is
impossible, a ValueError exception is raised.

Parameters
----------
Expand Down Expand Up @@ -2197,8 +2198,9 @@ def dropna(self, how="any"):

def unique(self, level=None):
"""
Return unique values in the index. Uniques are returned in order
of appearance, this does NOT sort.
Return unique values in the index.

Unique values are returned in order of appearance, this does NOT sort.

Parameters
----------
Expand Down Expand Up @@ -2675,8 +2677,7 @@ def intersection(self, other, sort=False):

def difference(self, other, sort=None):
"""
Return a new Index with elements from the index that are not in
`other`.
Return a new Index with elements of index not in `other`.

This is the set difference of two Index objects.

Expand Down Expand Up @@ -3271,8 +3272,7 @@ def _can_reindex(self, indexer):

def reindex(self, target, method=None, level=None, limit=None, tolerance=None):
"""
Create index with target's values (move/add/delete values
as necessary).
Create index with target's values.

Parameters
----------
Expand Down Expand Up @@ -4253,8 +4253,7 @@ def equals(self, other: Any) -> bool:

def identical(self, other) -> bool:
"""
Similar to equals, but check that other comparable attributes are
also equal.
Similar to equals, but checks that object attributes and types are also equal.

Returns
-------
Expand Down Expand Up @@ -4340,8 +4339,7 @@ def asof(self, label):

def asof_locs(self, where, mask):
"""
Find the locations (indices) of the labels from the index for
every entry in the `where` argument.
Return the locations (indices) of labels in the index.

As in the `asof` function, if the label (a particular entry in
`where`) is not in the index, the latest index label up to the
Expand Down Expand Up @@ -4551,8 +4549,9 @@ def argsort(self, *args, **kwargs) -> np.ndarray:

def get_value(self, series: "Series", key):
"""
Fast lookup of value from 1-dimensional ndarray. Only use this if you
know what you're doing.
Fast lookup of value from 1-dimensional ndarray.

Only use this if you know what you're doing.

Returns
-------
Expand Down Expand Up @@ -4905,8 +4904,9 @@ def _get_string_slice(self, key: str_t, use_lhs: bool = True, use_rhs: bool = Tr

def slice_indexer(self, start=None, end=None, step=None, kind=None):
"""
For an ordered or unique index, compute the slice indexer for input
labels and step.
Compute the slice indexer for input labels and step.

Index needs to be ordered and unique.

Parameters
----------
Expand Down