pandas.IntervalIndex.right#
- IntervalIndex.right[source]#
Return right bounds of the intervals in the IntervalIndex.
The right bounds of each interval in the IntervalIndex are returned as an Index. The datatype of the right bounds is the same as the datatype of the endpoints of the intervals.
- Returns:
- Index
An Index containing the right bounds of the intervals.
See also
IntervalIndex.leftReturn the left bounds of the intervals in the IntervalIndex.
IntervalIndex.midReturn the mid-point of the intervals in the IntervalIndex.
IntervalIndex.lengthReturn the length of the intervals in the IntervalIndex.
Examples
>>> iv_idx = pd.IntervalIndex.from_arrays([1, 2, 3], [4, 5, 6], closed="right") >>> iv_idx.right Index([4, 5, 6], dtype='int64')
>>> iv_idx = pd.IntervalIndex.from_tuples( ... [(1, 4), (2, 5), (3, 6)], closed="left" ... ) >>> iv_idx.right Index([4, 5, 6], dtype='int64')