pandas.arrays.IntervalArray.left#
- property IntervalArray.left[source]#
Return the left endpoints of each Interval in the IntervalArray as an Index.
This property provides access to the left endpoints of the intervals contained within the IntervalArray. This can be useful for analyses where the starting point of each interval is of interest, such as in histogram creation, data aggregation, or any scenario requiring the identification of the beginning of defined ranges. This property returns a
pandas.Indexobject containing the midpoint for each interval.See also
arrays.IntervalArray.rightReturn the right endpoints of each Interval in the IntervalArray as an Index.
arrays.IntervalArray.midReturn the midpoint of each Interval in the IntervalArray as an Index.
arrays.IntervalArray.containsCheck elementwise if the Intervals contain the value.
Examples
>>> interv_arr = pd.arrays.IntervalArray([pd.Interval(0, 1), pd.Interval(2, 5)]) >>> interv_arr <IntervalArray> [(0, 1], (2, 5]] Length: 2, dtype: interval[int64, right] >>> interv_arr.left Index([0, 2], dtype='int64')