Skip to content

Commit 85d4980

Browse files
committed
update doc
1 parent fcd2773 commit 85d4980

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/user_guide/categorical.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ By passing a :class:`pandas.Categorical` object to a ``Series`` or assigning it
7777
.. ipython:: python
7878
7979
raw_cat = pd.Categorical(
80-
[None, "b", "c", "a"], categories=["b", "c", "d"], ordered=False
80+
[None, "b", "c", None], categories=["b", "c", "d"], ordered=False
8181
)
8282
s = pd.Series(raw_cat)
8383
s
@@ -145,7 +145,7 @@ of :class:`~pandas.api.types.CategoricalDtype`.
145145
146146
from pandas.api.types import CategoricalDtype
147147
148-
s = pd.Series(["a", "b", "c", "a"])
148+
s = pd.Series([None, "b", "c", None])
149149
cat_type = CategoricalDtype(categories=["b", "c", "d"], ordered=True)
150150
s_cat = s.astype(cat_type)
151151
s_cat

0 commit comments

Comments
 (0)