pandas.arrays.IntervalArray.closed#
- property IntervalArray.closed[source]#
String describing the inclusive side the intervals.
Either
left
,right
,both
orneither
.Examples
For arrays:
>>> interv_arr = pd.arrays.IntervalArray([pd.Interval(0, 1), pd.Interval(1, 5)]) >>> interv_arr <IntervalArray> [(0, 1], (1, 5]] Length: 2, dtype: interval[int64, right] >>> interv_arr.closed 'right'
For Interval Index:
>>> interv_idx = pd.interval_range(start=0, end=2) >>> interv_idx IntervalIndex([(0, 1], (1, 2]], dtype='interval[int64, right]') >>> interv_idx.closed 'right'