|
30 | 30 | _VALID_CLOSED = {'left', 'right', 'both', 'neither'}
|
31 | 31 | _interval_shared_docs = {}
|
32 | 32 |
|
33 |
| -# TODO(jschendel) remove constructor key when IntervalArray is public (GH22860) |
34 | 33 | _shared_docs_kwargs = dict(
|
35 | 34 | klass='IntervalArray',
|
36 |
| - constructor='pd.core.arrays.IntervalArray', |
37 | 35 | name=''
|
38 | 36 | )
|
39 | 37 |
|
|
105 | 103 | """
|
106 | 104 |
|
107 | 105 |
|
108 |
| -# TODO(jschendel) use a more direct call in Examples when made public (GH22860) |
109 | 106 | @Appender(_interval_shared_docs['class'] % dict(
|
110 | 107 | klass="IntervalArray",
|
111 | 108 | summary="Pandas array for interval data that are closed on the same side.",
|
|
119 | 116 | A new ``IntervalArray`` can be constructed directly from an array-like of
|
120 | 117 | ``Interval`` objects:
|
121 | 118 |
|
122 |
| - >>> pd.core.arrays.IntervalArray([pd.Interval(0, 1), pd.Interval(1, 5)]) |
| 119 | + >>> pd.IntervalArray([pd.Interval(0, 1), pd.Interval(1, 5)]) |
123 | 120 | IntervalArray([(0, 1], (1, 5]],
|
124 | 121 | closed='right',
|
125 | 122 | dtype='interval[int64]')
|
@@ -1035,7 +1032,7 @@ def repeat(self, repeats, axis=None):
|
1035 | 1032 |
|
1036 | 1033 | Examples
|
1037 | 1034 | --------
|
1038 |
| - >>> intervals = %(constructor)s.from_tuples([(0, 1), (1, 3), (2, 4)]) |
| 1035 | + >>> intervals = pd.%(klass)s.from_tuples([(0, 1), (1, 3), (2, 4)]) |
1039 | 1036 | >>> intervals
|
1040 | 1037 | %(klass)s([(0, 1], (1, 3], (2, 4]],
|
1041 | 1038 | closed='right',
|
|
0 commit comments