Skip to content

Commit

Permalink
DOC: fix SA01, ES01 for pandas.arrays.IntervalArray.mid (pandas-dev#5…
Browse files Browse the repository at this point in the history
…9867)

* DOC: fix SA01, ES01 for pandas.arrays.IntervalArray.mid

* DOC: add double backticks for sphinx compatibility

Co-authored-by: mroeschke <mroeschke@users.noreply.github.com>

---------

Co-authored-by: mroeschke <mroeschke@users.noreply.github.com>
  • Loading branch information
tuhinsharma121 and mroeschke authored Sep 25, 2024
1 parent cf79ac8 commit 1ddf028
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.arrays.IntegerArray SA01" \
-i "pandas.arrays.IntervalArray.left SA01" \
-i "pandas.arrays.IntervalArray.length SA01" \
-i "pandas.arrays.IntervalArray.mid SA01" \
-i "pandas.arrays.IntervalArray.right SA01" \
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.SparseArray PR07,SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,16 @@ def mid(self) -> Index:
"""
Return the midpoint of each Interval in the IntervalArray as an Index.
The midpoint of an interval is calculated as the average of its
``left`` and ``right`` bounds. This property returns a ``pandas.Index`` object
containing the midpoint for each interval.
See Also
--------
Interval.left : Return left bound for the interval.
Interval.right : Return right bound for the interval.
Interval.length : Return the length of each interval.
Examples
--------
Expand Down

0 comments on commit 1ddf028

Please sign in to comment.