Skip to content

Commit 1ddf028

Browse files
DOC: fix SA01, ES01 for pandas.arrays.IntervalArray.mid (#59867)
* DOC: fix SA01, ES01 for pandas.arrays.IntervalArray.mid * DOC: add double backticks for sphinx compatibility Co-authored-by: mroeschke <[email protected]> --------- Co-authored-by: mroeschke <[email protected]>
1 parent cf79ac8 commit 1ddf028

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
125125
-i "pandas.arrays.IntegerArray SA01" \
126126
-i "pandas.arrays.IntervalArray.left SA01" \
127127
-i "pandas.arrays.IntervalArray.length SA01" \
128-
-i "pandas.arrays.IntervalArray.mid SA01" \
129128
-i "pandas.arrays.IntervalArray.right SA01" \
130129
-i "pandas.arrays.NumpyExtensionArray SA01" \
131130
-i "pandas.arrays.SparseArray PR07,SA01" \

pandas/core/arrays/interval.py

+10
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,16 @@ def mid(self) -> Index:
12911291
"""
12921292
Return the midpoint of each Interval in the IntervalArray as an Index.
12931293
1294+
The midpoint of an interval is calculated as the average of its
1295+
``left`` and ``right`` bounds. This property returns a ``pandas.Index`` object
1296+
containing the midpoint for each interval.
1297+
1298+
See Also
1299+
--------
1300+
Interval.left : Return left bound for the interval.
1301+
Interval.right : Return right bound for the interval.
1302+
Interval.length : Return the length of each interval.
1303+
12941304
Examples
12951305
--------
12961306

0 commit comments

Comments
 (0)