From f30aeefec8e6f0819b9e7c2f8375f8f0f7b21086 Mon Sep 17 00:00:00 2001 From: willpeppo Date: Fri, 12 Jun 2020 17:00:55 -0400 Subject: [PATCH] DOC: updated core/indexes/base.py for SS06 errors (#34713) --- pandas/core/indexes/base.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 240882e561bc6..4a99d2dfe339a 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -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 ---------- @@ -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 ---------- @@ -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. @@ -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 ---------- @@ -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 ------- @@ -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 @@ -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 ------- @@ -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 ----------