Skip to content

Commit e3d8537

Browse files
DOC: fix SA01, ES01 for pandas.arrays.IntervalArray.mid
1 parent 2419343 commit e3d8537

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
133133
-i "pandas.arrays.IntegerArray SA01" \
134134
-i "pandas.arrays.IntervalArray.left SA01" \
135135
-i "pandas.arrays.IntervalArray.length SA01" \
136-
-i "pandas.arrays.IntervalArray.mid SA01" \
137136
-i "pandas.arrays.IntervalArray.right SA01" \
138137
-i "pandas.arrays.NumpyExtensionArray SA01" \
139138
-i "pandas.arrays.SparseArray PR07,SA01" \

pandas/core/arrays/interval.py

Lines changed: 10 additions & 0 deletions
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)