diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index fc2c486173b9d..bb25db0ee1a7f 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -107,6 +107,12 @@ cdef class IntervalMixin: def mid(self): """ Return the midpoint of the Interval. + + Examples + -------- + >>> iv = pd.Interval(0, 5) + >>> iv.mid + 2.5 """ try: return 0.5 * (self.left + self.right)