@@ -5780,11 +5780,11 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs):
5780
5780
Control raising of exceptions on invalid data for provided dtype.
5781
5781
5782
5782
- ``raise`` : allow exceptions to be raised
5783
- - ``ignore`` : suppress exceptions. On error return original object
5783
+ - ``ignore`` : suppress exceptions. On error return original object.
5784
5784
5785
5785
.. versionadded:: 0.20.0
5786
5786
5787
- kwargs : keyword arguments to pass on to the constructor
5787
+ ** kwargs : keyword arguments to pass on to the constructor
5788
5788
5789
5789
Returns
5790
5790
-------
@@ -5845,7 +5845,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs):
5845
5845
Convert to ordered categorical type with custom ordering:
5846
5846
5847
5847
>>> cat_dtype = pd.api.types.CategoricalDtype(
5848
- ... categories=[2, 1], ordered=True)
5848
+ ... categories=[2, 1], ordered=True)
5849
5849
>>> ser.astype(cat_dtype)
5850
5850
0 1
5851
5851
1 2
@@ -5855,7 +5855,7 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs):
5855
5855
Note that using ``copy=False`` and changing data on a new
5856
5856
pandas object may propagate changes:
5857
5857
5858
- >>> s1 = pd.Series([1,2])
5858
+ >>> s1 = pd.Series([1, 2])
5859
5859
>>> s2 = s1.astype('int64', copy=False)
5860
5860
>>> s2[0] = 10
5861
5861
>>> s1 # note that s1[0] has changed too
0 commit comments