Skip to content

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

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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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