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
@@ -13,6 +13,7 @@ Highlights include:
13
13
- ``Panel`` has been deprecated, see :ref:`here <whatsnew_0200.api_breaking.deprecate_panel>`
14
14
- Improved user API when accessing levels in ``.groupby()``, see :ref:`here <whatsnew_0200.enhancements.groupby_access>`
15
15
- Improved support for UInt64 dtypes, see :ref:`here <whatsnew_0200.enhancements.uint64_support>`
16
+
- Addition of an ``IntervalIndex`` and ``Interval`` scalar type, see :ref:`here <whatsnew_0200.enhancements.intervalindex>`
16
17
- A new orient for JSON serialization, ``orient='table'``, that uses the Table Schema spec, see :ref:`here <whatsnew_0200.enhancements.table_schema>`
17
18
- Window Binary Corr/Cov operations return a MultiIndexed ``DataFrame`` rather than a ``Panel``, as ``Panel`` is now deprecated, see :ref:`here <whatsnew_0200.api_breaking.rolling_pairwise>`
18
19
- Support for S3 handling now uses ``s3fs``, see :ref:`here <whatsnew_0200.api_breaking.s3>`
@@ -314,6 +315,36 @@ To convert a ``SparseDataFrame`` back to sparse SciPy matrix in COO format, you
314
315
315
316
sdf.to_coo()
316
317
318
+
.. _whatsnew_0200.enhancements.intervalindex:
319
+
320
+
IntervalIndex
321
+
^^^^^^^^^^^^^
322
+
323
+
pandas has gain an ``IntervalIndex`` with its own dtype, ``interval`` as well as the ``Interval`` scalar type. These allow first-class support for interval
324
+
notation, specifically as return type for ``pd.cut`` and ``pd.qcut``. (:issue:`7640`, :issue:`8625`)
325
+
326
+
**Previous behavior**:
327
+
328
+
.. code-block:: ipython
329
+
330
+
In [2]: pd.cut(range(3), 2)
331
+
Out[2]:
332
+
[(-0.002, 1], (-0.002, 1], (1, 2]]
333
+
Categories (2, object): [(-0.002, 1] < (1, 2]]
334
+
335
+
# the returned categories are strings, representing Intervals
0 commit comments