Skip to content

Commit

Permalink
CLN: doc string (pandas-dev#23469)
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 authored and Pingviinituutti committed Feb 28, 2019
1 parent bdc590a commit 7228881
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 7228881

Please sign in to comment.