Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ strings and apply several methods to it. These can be accessed like
Series.cat
Series.dt
Index.str
CategoricalIndex.str
MultiIndex.str
DatetimeIndex.str
TimedeltaIndex.str
Expand Down Expand Up @@ -1404,6 +1403,7 @@ CategoricalIndex

.. autosummary::
:toctree: generated/
:template: autosummary/class_without_autosummary.rst

CategoricalIndex

Expand Down Expand Up @@ -1432,6 +1432,7 @@ IntervalIndex

.. autosummary::
:toctree: generated/
:template: autosummary/class_without_autosummary.rst

IntervalIndex

Expand Down
5 changes: 4 additions & 1 deletion doc/sphinxext/numpydoc/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def mangle_docstrings(app, what, name, obj, options, lines,
)

# PANDAS HACK (to remove the list of methods/attributes for Categorical)
if what == "class" and name.endswith(".Categorical"):
if what == "class" and (name.endswith(".Categorical") or
name.endswith("CategoricalIndex") or
name.endswith("Interval") or
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomAugspurger I think Interval class itself is OK to have with all its methods / attributes ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right... Is that in the api.rst?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like it, but I'll remove it anyway.

name.endswith("IntervalIndex")):
cfg['class_members_list'] = False

if what == 'module':
Expand Down
3 changes: 3 additions & 0 deletions pandas/core/indexes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class CategoricalIndex(Index, base.PandasDelegate):
name : object
Name to be stored in the index

See Also
--------
Categorical, Index
"""

_typ = 'categoricalindex'
Expand Down
4 changes: 4 additions & 0 deletions pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ class IntervalIndex(IntervalMixin, Index):
Name to be stored in the index.
copy : boolean, default False
Copy the meta-data

See Also
--------
Index
"""
_typ = 'intervalindex'
_comparables = ['name']
Expand Down