diff --git a/doc/source/categorical.rst b/doc/source/categorical.rst index 8835c4a1533d0..acc16b05d0913 100644 --- a/doc/source/categorical.rst +++ b/doc/source/categorical.rst @@ -3,7 +3,7 @@ .. currentmodule:: pandas .. ipython:: python - :suppress: +   :suppress: import numpy as np import pandas as pd @@ -144,8 +144,9 @@ Using ``.describe()`` on categorical data will produce similar output to a `Seri cat = pd.Categorical(["a", "c", "c", np.nan], categories=["b", "a", "c"]) df = pd.DataFrame({"cat":cat, "s":["a", "c", "c", np.nan]}) df.describe() - df["cat"].describe() +    df["cat"].describe() +.. _categorical.cat: Working with categories ----------------------- diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 49002cc19c11f..e63ec687fe830 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -566,7 +566,7 @@ Categorical - Bug in the categorical constructor with empty values and categories causing the ``.categories`` to be an empty ``Float64Index`` rather than an empty ``Index`` with object dtype (:issue:`17248`) -- Bug in categorical operations `Series.cat ' not preserving the original Series' name (:issue:`17509`) +- Bug in categorical operations :ref:`Series.cat ' not preserving the original Series' name (:issue:`17509`) PyPy ^^^^