Skip to content

Commit

Permalink
Add toctree for accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Aug 17, 2023
1 parent 15ec346 commit 33f78a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
1 change: 0 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
# to ensure that include files (partial pages) aren't built, exclude them
# https://github.com/sphinx-doc/sphinx/issues/1965#issuecomment-124732907
"**/includes/**",
"**/api/pandas.Series.dt.rst",
]
try:
import nbconvert
Expand Down
29 changes: 13 additions & 16 deletions doc/source/reference/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,19 @@ pandas provides dtype-specific methods under various accessors.
These are separate namespaces within :class:`Series` that only apply
to specific data types.

.. autosummary::
:toctree: api/
:nosignatures:
:template: autosummary/accessor.rst

Series.str
Series.cat
Series.dt
Series.sparse
DataFrame.sparse
Index.str


=========================== =================================
Data Type Accessor
=========================== =================================
Expand Down Expand Up @@ -458,22 +471,6 @@ strings and apply several methods to it. These can be accessed like
Series.str.isdecimal
Series.str.get_dummies

..
The following is needed to ensure the generated pages are created with the
correct template (otherwise they would be created in the Series/Index class page)
..
.. autosummary::
:toctree: api/
:template: autosummary/accessor.rst
Series.str
Series.cat
Series.dt
Series.sparse
DataFrame.sparse
Index.str

.. _api.series.cat:

Categorical accessor
Expand Down

0 comments on commit 33f78a0

Please sign in to comment.