From f66c1a37e2442ec456d8adac046d0dee031acebe Mon Sep 17 00:00:00 2001 From: zaki-indra <55521899+zaki-indra@users.noreply.github.com> Date: Sat, 29 Feb 2020 12:39:33 +0700 Subject: [PATCH 1/2] Fixing RT02 pandas.Index.dropna and PR08 pandas.Index.fillna --- pandas/core/indexes/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index ae2387f0fd7b4..86e090ca4bdc3 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2130,7 +2130,7 @@ def fillna(self, value=None, downcast=None): Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes. downcast : dict, default is None - a dict of item->dtype of what to downcast if possible, + A dict of item->dtype of what to downcast if possible, or the string 'infer' which will try to downcast to an appropriate equal type (e.g. float64 to int64 if possible). @@ -2159,7 +2159,8 @@ def dropna(self, how="any"): Returns ------- - valid : Index + valid + Index """ if how not in ("any", "all"): raise ValueError(f"invalid how option: {how}") From 88deb68c8b77486c99471a9d0713dd32b88f5ac2 Mon Sep 17 00:00:00 2001 From: William Ayd Date: Wed, 4 Mar 2020 07:40:34 -0800 Subject: [PATCH 2/2] Update base.py --- pandas/core/indexes/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 86e090ca4bdc3..a4ab23baadaed 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2159,8 +2159,7 @@ def dropna(self, how="any"): Returns ------- - valid - Index + Index """ if how not in ("any", "all"): raise ValueError(f"invalid how option: {how}")