From 9be1a4705fafdad0a1cb9de9ec7b83ff884938a7 Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Sun, 11 Dec 2022 08:20:13 +0000 Subject: [PATCH] fix some dosctring-RT02-error --- pandas/core/indexes/base.py | 12 ++++++------ pandas/io/formats/style_render.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 5a71ac247422a..ef6361d37cc90 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1116,7 +1116,7 @@ def _maybe_disallow_fill(self, allow_fill: bool, fill_value, indices) -> bool: Returns ------- - repeated_index : %(klass)s + %(klass)s Newly created %(klass)s with repeated elements. See Also @@ -2755,7 +2755,7 @@ def drop_duplicates(self: _IndexT, *, keep: DropKeep = "first") -> _IndexT: Returns ------- - deduplicated : Index + Index See Also -------- @@ -3128,7 +3128,7 @@ def intersection(self, other, sort: bool = False): Returns ------- - intersection : Index + Index Examples -------- @@ -5918,7 +5918,7 @@ def map(self, mapper, na_action=None): Returns ------- - applied : Union[Index, MultiIndex], inferred + Union[Index, MultiIndex] The output of the mapping function applied to the index. If the function returns a tuple with more than one element a MultiIndex will be returned. @@ -6397,7 +6397,7 @@ def insert(self, loc: int, item) -> Index: Returns ------- - new_index : Index + Index """ item = lib.item_from_zerodim(item) if is_valid_na_for_dtype(item, self.dtype) and self.dtype != object: @@ -6457,7 +6457,7 @@ def drop( Returns ------- - dropped : Index + Index Will be same type as self, except for RangeIndex. Raises diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index c4690730596ff..b74a8d0632cef 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -987,7 +987,7 @@ def format( Returns ------- - self : Styler + Styler See Also -------- @@ -1202,7 +1202,7 @@ def format_index( Returns ------- - self : Styler + Styler See Also -------- @@ -1365,7 +1365,7 @@ def relabel_index( Returns ------- - self : Styler + Styler See Also --------