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
15
16
Check the :ref:`API Changes <whatsnew_0200.api_breaking>` and :ref:`deprecations <whatsnew_0200.deprecations>` before updating.
16
17
@@ -117,6 +118,36 @@ Notably, a new numerical index, ``UInt64Index``, has been created (:issue:`14937
117
118
- Bug in ``pd.unique()`` in which unsigned 64-bit integers were causing overflow (:issue:`14915`)
118
119
- Bug in ``pd.value_counts()`` in which unsigned 64-bit integers were being erroneously truncated in the output (:issue:`14934`)
119
120
121
+
.. _whatsnew_0200.enhancements.intervalindex:
122
+
123
+
IntervalIndex
124
+
^^^^^^^^^^^^^
125
+
126
+
pandas has gain an ``IntervalIndex`` with its own dtype, ``interval`` as well as the ``Interval`` scalar type. These allow first-class support for interval
127
+
notation, specifically as return type for ``pd.cut`` and ``pd.qcut``. (:issue:`7640`, :issue:`8625`)
128
+
129
+
**Previous behavior**:
130
+
131
+
.. code-block:: ipython
132
+
133
+
In [2]: pd.cut(range(3), 2)
134
+
Out[2]:
135
+
[(-0.002, 1], (-0.002, 1], (1, 2]]
136
+
Categories (2, object): [(-0.002, 1] < (1, 2]]
137
+
138
+
# the returned categories are strings, representing Intervals
0 commit comments