@@ -158,6 +158,29 @@ cdef class Interval(IntervalMixin):
158
158
Whether the interval is closed on the left-side, right-side, both or
159
159
neither. See the Notes for more detailed explanation.
160
160
161
+ See Also
162
+ --------
163
+ IntervalIndex : An Index of Interval objects that are all closed on the
164
+ same side.
165
+ cut : Convert continuous data into discrete bins (Categorical
166
+ of Interval objects).
167
+ qcut : Convert continuous data into bins (Categorical of Interval objects)
168
+ based on quantiles.
169
+ Period : Represents a period of time.
170
+ """
171
+ _typ = " interval"
172
+
173
+ cdef readonly object left
174
+ """ Left bound for the interval"""
175
+
176
+ cdef readonly object right
177
+ """ Right bound for the interval"""
178
+
179
+ cdef readonly str closed
180
+ """
181
+ Whether the interval is closed on the left-side, right-side, both or
182
+ neither
183
+
161
184
Notes
162
185
-----
163
186
The parameters `left` and `right` must be from the same type, you must be
@@ -226,29 +249,6 @@ cdef class Interval(IntervalMixin):
226
249
>>> volume_1 = pd.Interval('Ant', 'Dog', closed='both')
227
250
>>> 'Bee' in volume_1
228
251
True
229
-
230
- See Also
231
- --------
232
- IntervalIndex : An Index of Interval objects that are all closed on the
233
- same side.
234
- cut : Convert continuous data into discrete bins (Categorical
235
- of Interval objects).
236
- qcut : Convert continuous data into bins (Categorical of Interval objects)
237
- based on quantiles.
238
- Period : Represents a period of time.
239
- """
240
- _typ = " interval"
241
-
242
- cdef readonly object left
243
- """ Left bound for the interval"""
244
-
245
- cdef readonly object right
246
- """ Right bound for the interval"""
247
-
248
- cdef readonly str closed
249
- """
250
- Whether the interval is closed on the left-side, right-side, both or
251
- neither
252
252
"""
253
253
254
254
def __init__ (self , left , right , str closed = ' right' ):
@@ -387,6 +387,11 @@ cdef class Interval(IntervalMixin):
387
387
bool
388
388
``True`` if the two intervals overlap, else ``False``.
389
389
390
+ See Also
391
+ --------
392
+ IntervalArray.overlaps : The corresponding method for IntervalArray
393
+ IntervalIndex.overlaps : The corresponding method for IntervalIndex
394
+
390
395
Examples
391
396
--------
392
397
>>> i1 = pd.Interval(0, 2)
@@ -409,11 +414,6 @@ cdef class Interval(IntervalMixin):
409
414
>>> i6 = pd.Interval(1, 2, closed='neither')
410
415
>>> i4.overlaps(i6)
411
416
False
412
-
413
- See Also
414
- --------
415
- IntervalArray.overlaps : The corresponding method for IntervalArray
416
- IntervalIndex.overlaps : The corresponding method for IntervalIndex
417
417
"""
418
418
if not isinstance (other, Interval):
419
419
msg = ' `other` must be an Interval, got {other}'
0 commit comments