Skip to content

Commit c4c2277

Browse files
committed
Add toctree for accessors
1 parent df5ae5a commit c4c2277

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
# to ensure that include files (partial pages) aren't built, exclude them
7777
# https://github.com/sphinx-doc/sphinx/issues/1965#issuecomment-124732907
7878
"**/includes/**",
79-
"**/api/pandas.Series.dt.rst",
8079
]
8180
try:
8281
import nbconvert

doc/source/reference/series.rst

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,19 @@ pandas provides dtype-specific methods under various accessors.
273273
These are separate namespaces within :class:`Series` that only apply
274274
to specific data types.
275275

276+
.. autosummary::
277+
:toctree: api/
278+
:nosignatures:
279+
:template: autosummary/accessor.rst
280+
281+
Series.str
282+
Series.cat
283+
Series.dt
284+
Series.sparse
285+
DataFrame.sparse
286+
Index.str
287+
288+
276289
=========================== =================================
277290
Data Type Accessor
278291
=========================== =================================
@@ -456,22 +469,6 @@ strings and apply several methods to it. These can be accessed like
456469
Series.str.isdecimal
457470
Series.str.get_dummies
458471

459-
..
460-
The following is needed to ensure the generated pages are created with the
461-
correct template (otherwise they would be created in the Series/Index class page)
462-
463-
..
464-
.. autosummary::
465-
:toctree: api/
466-
:template: autosummary/accessor.rst
467-
468-
Series.str
469-
Series.cat
470-
Series.dt
471-
Series.sparse
472-
DataFrame.sparse
473-
Index.str
474-
475472
.. _api.series.cat:
476473

477474
Categorical accessor

0 commit comments

Comments
 (0)