Skip to main content
`Ctrl`+`K`

# pandas.IntervalIndex.closed

IntervalIndex.closed

  String describing the inclusive side the intervals.

  Either `left`, `right`, `both` or `neither`.

  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'