You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.20.0.txt
+31
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Highlights include:
11
11
12
12
- Building pandas for development now requires ``cython >= 0.23`` (:issue:`14831`)
13
13
- The ``.ix`` indexer has been deprecated, see :ref:`here <whatsnew_0200.api_breaking.deprecate_ix>`
14
+
- Addition of an ``IntervalIndex`` and ``Interval`` scalar type, see :ref:`here <whatsnew_0200.enhancements.intervalindex>`
14
15
- Switched the test framework to `pytest`_ (:issue:`13097`)
15
16
16
17
.. _pytest: http://doc.pytest.org/en/latest/
@@ -120,6 +121,36 @@ Notably, a new numerical index, ``UInt64Index``, has been created (:issue:`14937
120
121
- Bug in ``pd.unique()`` in which unsigned 64-bit integers were causing overflow (:issue:`14915`)
121
122
- Bug in ``pd.value_counts()`` in which unsigned 64-bit integers were being erroneously truncated in the output (:issue:`14934`)
122
123
124
+
.. _whatsnew_0200.enhancements.intervalindex:
125
+
126
+
IntervalIndex
127
+
^^^^^^^^^^^^^
128
+
129
+
pandas has gain an ``IntervalIndex`` with its own dtype, ``interval`` as well as the ``Interval`` scalar type. These allow first-class support for interval
130
+
notation, specifically as return type for ``pd.cut`` and ``pd.qcut``. (:issue:`7640`, :issue:`8625`)
131
+
132
+
**Previous behavior**:
133
+
134
+
.. code-block:: ipython
135
+
136
+
In [2]: pd.cut(range(3), 2)
137
+
Out[2]:
138
+
[(-0.002, 1], (-0.002, 1], (1, 2]]
139
+
Categories (2, object): [(-0.002, 1] < (1, 2]]
140
+
141
+
# the returned categories are strings, representing Intervals
0 commit comments