Skip to content

Commit ffb3244

Browse files
committed
Remove incorrect series note
1 parent 9099175 commit ffb3244

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

doc/source/user_guide/categorical.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -615,20 +615,16 @@ Apart from :meth:`Series.min`, :meth:`Series.max` and :meth:`Series.mode`, the
615615
following operations are possible with categorical data:
616616

617617
``Series`` methods like :meth:`Series.value_counts` will use all categories,
618-
even if some categories are not present in the data, though this default is
619-
deprecated and will be changed in a future release. It is recommended to use
620-
the `observed` keyword explicitly:
618+
even if some categories are not present in the data:
621619

622620
.. ipython:: python
623-
:okwarning:
624621
625622
s = pd.Series(pd.Categorical(["a", "b", "c", "c"], categories=["c", "a", "b", "d"]))
626623
s.value_counts()
627624
628-
``DataFrame`` methods like :meth:`DataFrame.sum` also show "unused" categories.
625+
``DataFrame`` methods like :meth:`DataFrame.sum` also show "unused" categories:
629626

630627
.. ipython:: python
631-
:okwarning:
632628
633629
columns = pd.Categorical(
634630
["One", "One", "Two"], categories=["One", "Two", "Three"], ordered=True
@@ -639,7 +635,9 @@ the `observed` keyword explicitly:
639635
)
640636
df.sum(axis=1, level=1)
641637
642-
Groupby will also show "unused" categories:
638+
Groupby will also show "unused" categories, though this default is deprecated
639+
and will be changed in a future release. It is recommended to use the
640+
`observed` keyword explicitly:
643641

644642
.. ipython:: python
645643
:okwarning:

0 commit comments

Comments
 (0)