Skip to content

Commit 213b8eb

Browse files
committed
review edits
1 parent 943ed8f commit 213b8eb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pandas/core/indexes/interval.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ class IntervalIndex(IntervalMixin, Index):
155155
dtype : dtype or None, default None
156156
If None, dtype will be inferred
157157
158+
..versionadded:: 0.23.0
159+
158160
Attributes
159161
----------
160162
left
@@ -430,6 +432,8 @@ def from_breaks(cls, breaks, closed='right', name=None, copy=False,
430432
dtype : dtype or None, default None
431433
If None, dtype will be inferred
432434
435+
..versionadded:: 0.23.0
436+
433437
Examples
434438
--------
435439
>>> pd.IntervalIndex.from_breaks([0, 1, 2, 3])
@@ -472,6 +476,8 @@ def from_arrays(cls, left, right, closed='right', name=None, copy=False,
472476
dtype : dtype or None, default None
473477
If None, dtype will be inferred
474478
479+
..versionadded:: 0.23.0
480+
475481
Examples
476482
--------
477483
>>> 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,
513519
dtype : dtype or None, default None
514520
If None, dtype will be inferred
515521
522+
..versionadded:: 0.23.0
523+
516524
Examples
517525
--------
518526
>>> pd.IntervalIndex.from_intervals([pd.Interval(0, 1),
@@ -562,6 +570,8 @@ def from_tuples(cls, data, closed='right', name=None, copy=False,
562570
dtype : dtype or None, default None
563571
If None, dtype will be inferred
564572
573+
..versionadded:: 0.23.0
574+
565575
Examples
566576
--------
567577
>>> pd.IntervalIndex.from_tuples([(0, 1), (1,2)])
@@ -598,10 +608,6 @@ def from_tuples(cls, data, closed='right', name=None, copy=False,
598608
left.append(lhs)
599609
right.append(rhs)
600610

601-
# TODO
602-
# if we have nulls and we previous had *only*
603-
# integer data, then we have changed the dtype
604-
605611
return cls.from_arrays(left, right, closed, name=name, copy=False,
606612
dtype=dtype)
607613

pandas/tests/indexes/interval/test_construction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def name(request):
2626
class Base(object):
2727
"""
2828
Common tests for all variations of IntervalIndex construction. Input data
29-
to be supplied in breaks format, then converted by the superclass method
29+
to be supplied in breaks format, then converted by the subclass method
3030
get_kwargs_from_breaks to the expected format.
3131
"""
3232

0 commit comments

Comments
 (0)