Skip to content

Commit 2570167

Browse files
committed
Add accessor attrs to API reference
1 parent 74972b7 commit 2570167

File tree

4 files changed

+36
-16
lines changed

4 files changed

+36
-16
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/frame.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ Sparse accessor
347347
Sparse-dtype specific methods and attributes are provided under the
348348
``DataFrame.sparse`` accessor.
349349

350+
.. autosummary::
351+
:toctree: api/
352+
:template: autosummary/accessor.rst
353+
354+
DataFrame.sparse
355+
350356
.. autosummary::
351357
:toctree: api/
352358
:template: autosummary/accessor_attribute.rst

doc/source/reference/indexing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ Properties
4242
Index.T
4343
Index.memory_usage
4444

45+
.. autosummary::
46+
:toctree: api/
47+
:template: autosummary/accessor.rst
48+
49+
Index.str
50+
4551
Modifying and computations
4652
~~~~~~~~~~~~~~~~~~~~~~~~~~
4753
.. autosummary::

doc/source/reference/series.rst

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ These can be accessed like ``Series.dt.<property>``.
294294
Datetime properties
295295
^^^^^^^^^^^^^^^^^^^
296296

297+
.. autosummary::
298+
:toctree: api/
299+
:template: autosummary/accessor.rst
300+
301+
Series.dt
302+
297303
.. autosummary::
298304
:toctree: api/
299305
:template: autosummary/accessor_attribute.rst
@@ -397,6 +403,12 @@ String handling
397403
strings and apply several methods to it. These can be accessed like
398404
``Series.str.<function/property>``.
399405

406+
.. autosummary::
407+
:toctree: api/
408+
:template: autosummary/accessor.rst
409+
410+
Series.str
411+
400412
.. autosummary::
401413
:toctree: api/
402414
:template: autosummary/accessor_method.rst
@@ -458,21 +470,6 @@ strings and apply several methods to it. These can be accessed like
458470
Series.str.isdecimal
459471
Series.str.get_dummies
460472

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

477474
.. _api.series.cat:
478475

@@ -482,6 +479,12 @@ Categorical accessor
482479
Categorical-dtype specific methods and attributes are available under
483480
the ``Series.cat`` accessor.
484481

482+
.. autosummary::
483+
:toctree: api/
484+
:template: autosummary/accessor.rst
485+
486+
Series.cat
487+
485488
.. autosummary::
486489
:toctree: api/
487490
:template: autosummary/accessor_attribute.rst
@@ -512,6 +515,12 @@ Sparse accessor
512515
Sparse-dtype specific methods and attributes are provided under the
513516
``Series.sparse`` accessor.
514517

518+
.. autosummary::
519+
:toctree: api/
520+
:template: autosummary/accessor.rst
521+
522+
Series.sparse
523+
515524
.. autosummary::
516525
:toctree: api/
517526
:template: autosummary/accessor_attribute.rst

0 commit comments

Comments
 (0)