pandas.IntervalIndex.left#

IntervalIndex.left[source]#

Return left bounds of the intervals in the IntervalIndex.

The left bounds of each interval in the IntervalIndex are returned as an Index. The datatype of the left bounds is the same as the datatype of the endpoints of the intervals.

Returns:
Index

An Index containing the left bounds of the intervals.

See also

IntervalIndex.right

Return the right bounds of the intervals in the IntervalIndex.

IntervalIndex.mid

Return the mid-point of the intervals in the IntervalIndex.

IntervalIndex.length

Return 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.left
Index([1, 2, 3], dtype='int64')
>>> iv_idx = pd.IntervalIndex.from_tuples(
...     [(1, 4), (2, 5), (3, 6)], closed="left"
... )
>>> iv_idx.left
Index([1, 2, 3], dtype='int64')