Skip to content

Commit

Permalink
CLN: doc string (#23469)
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 authored and jreback committed Nov 3, 2018
1 parent 528ce15 commit d78bd7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5279,7 +5279,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
Convert to ordered categorical type with custom ordering:
>>> ser.astype('category', ordered=True, categories=[2, 1])
>>> cat_dtype = pd.api.types.CategoricalDtype(
... categories=[2, 1], ordered=True)
>>> ser.astype(cat_dtype)
0 1
1 2
dtype: category
Expand Down

0 comments on commit d78bd7a

Please sign in to comment.