Skip to content

Commit 14ee9de

Browse files
DOC: array class docstring pages without autosummary tables (#26834)
1 parent 2d2606d commit 14ee9de

File tree

8 files changed

+82
-0
lines changed

8 files changed

+82
-0
lines changed

doc/source/reference/arrays.rst

+29
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ If the data are tz-aware, then every value in the array must have the same timez
144144

145145
.. autosummary::
146146
:toctree: api/
147+
:template: autosummary/class_without_autosummary.rst
147148

148149
arrays.DatetimeArray
149150

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

205206
.. autosummary::
206207
:toctree: api/
208+
:template: autosummary/class_without_autosummary.rst
207209

208210
arrays.TimedeltaArray
209211

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

264266
.. autosummary::
265267
:toctree: api/
268+
:template: autosummary/class_without_autosummary.rst
266269

267270
arrays.PeriodArray
268271

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

305308
.. autosummary::
306309
:toctree: api/
310+
:template: autosummary/class_without_autosummary.rst
307311

308312
arrays.IntervalArray
309313

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

314318
IntervalDtype
315319

320+
321+
.. Those attributes and methods are included in the API because the docstrings
322+
.. of IntervalIndex and IntervalArray are shared. Including it here to make
323+
.. sure a docstring page is built for them to avoid warnings
324+
325+
..
326+
.. autosummary::
327+
:toctree: api/
328+
329+
arrays.IntervalArray.left
330+
arrays.IntervalArray.right
331+
arrays.IntervalArray.closed
332+
arrays.IntervalArray.mid
333+
arrays.IntervalArray.length
334+
arrays.IntervalArray.is_non_overlapping_monotonic
335+
arrays.IntervalArray.from_arrays
336+
arrays.IntervalArray.from_tuples
337+
arrays.IntervalArray.from_breaks
338+
arrays.IntervalArray.overlaps
339+
arrays.IntervalArray.set_closed
340+
arrays.IntervalArray.to_tuples
341+
342+
316343
.. _api.arrays.integer_na:
317344

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

324351
.. autosummary::
325352
:toctree: api/
353+
:template: autosummary/class_without_autosummary.rst
326354

327355
arrays.IntegerArray
328356

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

415443
.. autosummary::
416444
:toctree: api/
445+
:template: autosummary/class_without_autosummary.rst
417446

418447
SparseArray
419448

doc/source/reference/extensions.rst

+5
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ objects.
1919
api.extensions.register_index_accessor
2020
api.extensions.ExtensionDtype
2121
api.extensions.ExtensionArray
22+
23+
.. autosummary::
24+
:toctree: api/
25+
:template: autosummary/class_without_autosummary.rst
26+
2227
arrays.PandasArray

pandas/core/arrays/datetimes.py

+8
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin,
236236
freq : str or Offset, optional
237237
copy : bool, default False
238238
Whether to copy the underlying array of values.
239+
240+
Attributes
241+
----------
242+
None
243+
244+
Methods
245+
-------
246+
None
239247
"""
240248
_typ = "datetimearray"
241249
_scalar_type = Timestamp

pandas/core/arrays/integer.py

+8
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,14 @@ class IntegerArray(ExtensionArray, ExtensionOpsMixin):
244244
copy : bool, default False
245245
Whether to copy the `values` and `mask`.
246246
247+
Attributes
248+
----------
249+
None
250+
251+
Methods
252+
-------
253+
None
254+
247255
Returns
248256
-------
249257
IntegerArray

pandas/core/arrays/numpy_.py

+8
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
9898
The NumPy ndarray to wrap. Must be 1-dimensional.
9999
copy : bool, default False
100100
Whether to copy `values`.
101+
102+
Attributes
103+
----------
104+
None
105+
106+
Methods
107+
-------
108+
None
101109
"""
102110
# If you're wondering why pd.Series(cls) doesn't put the array in an
103111
# ExtensionBlock, search for `ABCPandasArray`. We check for

pandas/core/arrays/period.py

+8
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, dtl.DatelikeOps):
112112
copy : bool, default False
113113
Whether to copy the ordinals before storing.
114114
115+
Attributes
116+
----------
117+
None
118+
119+
Methods
120+
-------
121+
None
122+
115123
See Also
116124
--------
117125
period_array : Create a new PeriodArray.

pandas/core/arrays/sparse.py

+8
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,14 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
572572
this determines ``self.sp_values`` and ``self.fill_value``.
573573
copy : bool, default False
574574
Whether to explicitly copy the incoming `data` array.
575+
576+
Attributes
577+
----------
578+
None
579+
580+
Methods
581+
-------
582+
None
575583
"""
576584

577585
_pandas_ftype = 'sparse'

pandas/core/arrays/timedeltas.py

+8
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ class TimedeltaArray(dtl.DatetimeLikeArrayMixin, dtl.TimelikeOps):
127127
freq : Offset, optional
128128
copy : bool, default False
129129
Whether to copy the underlying array of data.
130+
131+
Attributes
132+
----------
133+
None
134+
135+
Methods
136+
-------
137+
None
130138
"""
131139
_typ = "timedeltaarray"
132140
_scalar_type = Timedelta

0 commit comments

Comments
 (0)