Skip to main content
`Ctrl`+`K`

# pandas.IntervalDtype

class pandas.IntervalDtype(subtype=None, closed=None)

  An ExtensionDtype for Interval data.

  This is not an actual numpy dtype, but a duck type.

  Parameters:
    subtype str, np.dtype

      The dtype of the Interval bounds.

    closed{‘right’, ‘left’, ‘both’, ‘neither’}, default ‘right’

      Whether the interval is closed on the left-side, right-side, both or neither. See the Notes for more detailed explanation.

  Attributes

  `subtype` | The dtype of the Interval bounds.

  Methods

  None |

  See also

  `PeriodDtype`

    An ExtensionDtype for Period data.

  Examples

      >>> pd.IntervalDtype(subtype="int64", closed="both")
      interval[int64, both]