@@ -155,6 +155,8 @@ class IntervalIndex(IntervalMixin, Index):
155
155
dtype : dtype or None, default None
156
156
If None, dtype will be inferred
157
157
158
+ ..versionadded:: 0.23.0
159
+
158
160
Attributes
159
161
----------
160
162
left
@@ -430,6 +432,8 @@ def from_breaks(cls, breaks, closed='right', name=None, copy=False,
430
432
dtype : dtype or None, default None
431
433
If None, dtype will be inferred
432
434
435
+ ..versionadded:: 0.23.0
436
+
433
437
Examples
434
438
--------
435
439
>>> pd.IntervalIndex.from_breaks([0, 1, 2, 3])
@@ -472,6 +476,8 @@ def from_arrays(cls, left, right, closed='right', name=None, copy=False,
472
476
dtype : dtype or None, default None
473
477
If None, dtype will be inferred
474
478
479
+ ..versionadded:: 0.23.0
480
+
475
481
Examples
476
482
--------
477
483
>>> pd.IntervalIndex.from_arrays([0, 1, 2], [1, 2, 3])
@@ -513,6 +519,8 @@ def from_intervals(cls, data, closed=None, name=None, copy=False,
513
519
dtype : dtype or None, default None
514
520
If None, dtype will be inferred
515
521
522
+ ..versionadded:: 0.23.0
523
+
516
524
Examples
517
525
--------
518
526
>>> pd.IntervalIndex.from_intervals([pd.Interval(0, 1),
@@ -562,6 +570,8 @@ def from_tuples(cls, data, closed='right', name=None, copy=False,
562
570
dtype : dtype or None, default None
563
571
If None, dtype will be inferred
564
572
573
+ ..versionadded:: 0.23.0
574
+
565
575
Examples
566
576
--------
567
577
>>> pd.IntervalIndex.from_tuples([(0, 1), (1,2)])
@@ -598,10 +608,6 @@ def from_tuples(cls, data, closed='right', name=None, copy=False,
598
608
left .append (lhs )
599
609
right .append (rhs )
600
610
601
- # TODO
602
- # if we have nulls and we previous had *only*
603
- # integer data, then we have changed the dtype
604
-
605
611
return cls .from_arrays (left , right , closed , name = name , copy = False ,
606
612
dtype = dtype )
607
613
0 commit comments