Skip to content

DOC: array class docstring pages without autosummary tables #26834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions doc/source/reference/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ If the data are tz-aware, then every value in the array must have the same timez

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

arrays.DatetimeArray

Expand Down Expand Up @@ -204,6 +205,7 @@ A collection of timedeltas may be stored in a :class:`TimedeltaArray`.

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

arrays.TimedeltaArray

Expand Down Expand Up @@ -263,6 +265,7 @@ Every period in a ``PeriodArray`` must have the same ``freq``.

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

arrays.PeriodArray

Expand Down Expand Up @@ -304,6 +307,7 @@ A collection of intervals may be stored in an :class:`arrays.IntervalArray`.

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

arrays.IntervalArray

Expand All @@ -313,6 +317,29 @@ A collection of intervals may be stored in an :class:`arrays.IntervalArray`.

IntervalDtype


.. Those attributes and methods are included in the API because the docstrings
.. of IntervalIndex and IntervalArray are shared. Including it here to make
.. sure a docstring page is built for them to avoid warnings

..
.. autosummary::
:toctree: api/

arrays.IntervalArray.left
arrays.IntervalArray.right
arrays.IntervalArray.closed
arrays.IntervalArray.mid
arrays.IntervalArray.length
arrays.IntervalArray.is_non_overlapping_monotonic
arrays.IntervalArray.from_arrays
arrays.IntervalArray.from_tuples
arrays.IntervalArray.from_breaks
arrays.IntervalArray.overlaps
arrays.IntervalArray.set_closed
arrays.IntervalArray.to_tuples


.. _api.arrays.integer_na:

Nullable Integer
Expand All @@ -323,6 +350,7 @@ Pandas provides this through :class:`arrays.IntegerArray`.

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

arrays.IntegerArray

Expand Down Expand Up @@ -414,6 +442,7 @@ be stored efficiently as a :class:`SparseArray`.

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

SparseArray

Expand Down
5 changes: 5 additions & 0 deletions doc/source/reference/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ objects.
api.extensions.register_index_accessor
api.extensions.ExtensionDtype
api.extensions.ExtensionArray

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

arrays.PandasArray
8 changes: 8 additions & 0 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin,
freq : str or Offset, optional
copy : bool, default False
Whether to copy the underlying array of values.

Attributes
----------
None

Methods
-------
None
"""
_typ = "datetimearray"
_scalar_type = Timestamp
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/arrays/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ class IntegerArray(ExtensionArray, ExtensionOpsMixin):
copy : bool, default False
Whether to copy the `values` and `mask`.

Attributes
----------
None

Methods
-------
None

Returns
-------
IntegerArray
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/arrays/numpy_.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
The NumPy ndarray to wrap. Must be 1-dimensional.
copy : bool, default False
Whether to copy `values`.

Attributes
----------
None

Methods
-------
None
"""
# If you're wondering why pd.Series(cls) doesn't put the array in an
# ExtensionBlock, search for `ABCPandasArray`. We check for
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, dtl.DatelikeOps):
copy : bool, default False
Whether to copy the ordinals before storing.

Attributes
----------
None

Methods
-------
None

See Also
--------
period_array : Create a new PeriodArray.
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/arrays/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,14 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
this determines ``self.sp_values`` and ``self.fill_value``.
copy : bool, default False
Whether to explicitly copy the incoming `data` array.

Attributes
----------
None

Methods
-------
None
"""

_pandas_ftype = 'sparse'
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/arrays/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ class TimedeltaArray(dtl.DatetimeLikeArrayMixin, dtl.TimelikeOps):
freq : Offset, optional
copy : bool, default False
Whether to copy the underlying array of data.

Attributes
----------
None

Methods
-------
None
"""
_typ = "timedeltaarray"
_scalar_type = Timedelta
Expand Down