The left
attribute of an IntervalArray
object is used to return the left endpoints intervals of the object as an index.
Note:
IntervalArray
is an object containing interval data such that the data is closed on the same side.
The left endpoint of an IntervalArray
represents the start of the intervals of the object. For example, the intervals, (0, 2)
and (3, 4)
, have their intervals starting from 0
and 3
respectively. Hence, they both represent the left endpoints of the intervals.
IntervalArray.left
The left
attribute doesn't take any parameters.
It returns the left endpoints of the IntervalArray
object as an index.
# A code to illustrate the left attribute of an IntervalArray object.# importing the pandas libraryimport pandas as pd# creating the IntervalArray objecta = pd.arrays.IntervalArray([pd.Interval(0, 4), pd.Interval(1, 5)])# obtaining the left endpointsprint(a.left)
pandas
library.IntervalArray
object, a
using the pd.arrays.IntervalArray()
function.left
attribute to obtain the left endpoints of a
.