Skip to content

Commit 1d46eb4

Browse files
committed
Change docs for CategoricalIndex and IntervalIndex
No autosummary with methods for them. Added to our hacks list in our numpydoc
1 parent 2775d9b commit 1d46eb4

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

doc/source/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ strings and apply several methods to it. These can be accessed like
618618
Series.cat
619619
Series.dt
620620
Index.str
621-
CategoricalIndex.str
622621
MultiIndex.str
623622
DatetimeIndex.str
624623
TimedeltaIndex.str

doc/sphinxext/numpydoc/numpydoc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def mangle_docstrings(app, what, name, obj, options, lines,
4343
)
4444

4545
# PANDAS HACK (to remove the list of methods/attributes for Categorical)
46-
if what == "class" and name.endswith(".Categorical"):
46+
if what == "class" and (name.endswith(".Categorical") or
47+
name.endswith("CategoricalIndex") or
48+
name.endswith("Interval") or
49+
name.endswith("IntervalIndex")):
4750
cfg['class_members_list'] = False
4851

4952
if what == 'module':

pandas/core/indexes/category.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class CategoricalIndex(Index, base.PandasDelegate):
4747
name : object
4848
Name to be stored in the index
4949
50+
See Also
51+
--------
52+
Categorical, Index
5053
"""
5154

5255
_typ = 'categoricalindex'

pandas/core/indexes/interval.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ class IntervalIndex(IntervalMixin, Index):
110110
Name to be stored in the index.
111111
copy : boolean, default False
112112
Copy the meta-data
113+
114+
See Also
115+
--------
116+
Index
113117
"""
114118
_typ = 'intervalindex'
115119
_comparables = ['name']

0 commit comments

Comments
 (0)