The right
attribute of an IntervalArray
object in Pandas returns the right endpoint intervals of the object as an index.
Note: An
IntervalArray
is an object containing interval data such that they are closed on the same side.
The right
attribute takes the syntax below:
IntervalArray.right
The right
attribute takes no parameter value.
The right
attribute returns the right endpoints of the IntervalArray
object as an index.
# A code to illustrate the right attribute of an IntervalArray object # Importing the Pandas library import pandas as pd # Creating the IntervalArray object a = pd.arrays.IntervalArray([pd.Interval(0, 4), pd.Interval(1, 5)]) # Printing the IntervalArray object print(a) # Obtaining the right endpoints print(a.right)
IntervalArray
object, a
.a
.right
attribute, we obtain the right endpoints of a
.RELATED TAGS
CONTRIBUTOR
View all Courses