pandas.Interval.mid#
- Interval.mid#
Return the midpoint of the Interval.
The midpoint is the average of the left and right bounds, or equivalently the left bound plus half of
length.See also
Interval.leftReturn the left bound for the interval.
Interval.rightReturn the right bound for the interval.
Interval.lengthReturn the length of the interval.
Examples
>>> iv = pd.Interval(0, 5) >>> iv.mid 2.5