From 2c62facc1ec90a8ff23e5f8eb86ab930ae3f7294 Mon Sep 17 00:00:00 2001 From: mazghal Date: Sun, 8 Sep 2019 15:24:31 +0200 Subject: [PATCH 1/4] replace kwargs by **kwargs --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index b427b1f0ac858..5c580b3040977 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5784,7 +5784,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs): .. versionadded:: 0.20.0 - kwargs : keyword arguments to pass on to the constructor + **kwargs : keyword arguments to pass on to the constructor Returns ------- From 732c58d0973cbab543a77bf3008736208eb42863 Mon Sep 17 00:00:00 2001 From: mazghal Date: Sun, 8 Sep 2019 15:25:49 +0200 Subject: [PATCH 2/4] add "." at the end of "errors" description --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 5c580b3040977..3024613570494 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5780,7 +5780,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs): Control raising of exceptions on invalid data for provided dtype. - ``raise`` : allow exceptions to be raised - - ``ignore`` : suppress exceptions. On error return original object + - ``ignore`` : suppress exceptions. On error return original object. .. versionadded:: 0.20.0 From 03c707e6f4659a4b42df34d911dce3b687f901f1 Mon Sep 17 00:00:00 2001 From: mazghal Date: Sun, 8 Sep 2019 15:27:54 +0200 Subject: [PATCH 3/4] fix continuation line over-indented for hanging indent --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 3024613570494..e1d835aa719b2 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5845,7 +5845,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs): Convert to ordered categorical type with custom ordering: >>> cat_dtype = pd.api.types.CategoricalDtype( - ... categories=[2, 1], ordered=True) + ... categories=[2, 1], ordered=True) >>> ser.astype(cat_dtype) 0 1 1 2 From 200b55921d815428fcf2bbf3a173a734927c35c3 Mon Sep 17 00:00:00 2001 From: mazghal Date: Sun, 8 Sep 2019 15:28:41 +0200 Subject: [PATCH 4/4] fix missing whitespace after ',' --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index e1d835aa719b2..831543ee66039 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5855,7 +5855,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs): Note that using ``copy=False`` and changing data on a new pandas object may propagate changes: - >>> s1 = pd.Series([1,2]) + >>> s1 = pd.Series([1, 2]) >>> s2 = s1.astype('int64', copy=False) >>> s2[0] = 10 >>> s1 # note that s1[0] has changed too