From 36c97d6e6c53465b014af34b9aeaf6011c817738 Mon Sep 17 00:00:00 2001 From: Muhammad Rafif Elfazri Date: Sun, 1 Mar 2020 05:08:10 +0700 Subject: [PATCH 1/3] Fix PR08, RT02, RT03, and SA01 on pandas.Index.fillna --- pandas/core/indexes/base.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index aa22527d8c2d7..fa8db499b57fe 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2126,13 +2126,19 @@ 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). Returns ------- - filled : Index + filled + Index. + + See Also + -------- + DataFrame.fillna : Fill NaN values of a DataFrame. + Series.fillna : Fill NaN Values of a Series. """ self._assert_can_do_op(value) if self.hasnans: From 0a92418b8954dc09f91a566120bb32ac14d3e8f0 Mon Sep 17 00:00:00 2001 From: Rafif Date: Tue, 3 Mar 2020 21:39:35 +0700 Subject: [PATCH 2/3] Update pandas/core/indexes/base.py Co-Authored-By: William Ayd --- pandas/core/indexes/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index fa8db499b57fe..58a2f74a3bae6 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2132,7 +2132,7 @@ def fillna(self, value=None, downcast=None): Returns ------- - filled + Index Index. See Also From e407a40779eb3200d946f38cccd8dc0e1d6fc259 Mon Sep 17 00:00:00 2001 From: William Ayd Date: Tue, 3 Mar 2020 16:58:56 -0800 Subject: [PATCH 3/3] Update base.py --- pandas/core/indexes/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 58a2f74a3bae6..d2887c6652635 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2133,7 +2133,6 @@ def fillna(self, value=None, downcast=None): Returns ------- Index - Index. See Also --------