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/release.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Highlights include:
52
52
- Integration with `Apache Parquet <https://parquet.apache.org/>`__, including a new top-level :func:`read_parquet` function and :meth:`DataFrame.to_parquet` method, see :ref:`here <whatsnew_0210.enhancements.parquet>`.
53
53
- New user-facing :class:`pandas.api.types.CategoricalDtype` for specifying
54
54
categoricals independent of the data, see :ref:`here <whatsnew_0210.enhancements.categorical_dtype>`.
55
-
- The behavior of ``sum`` and ``prod`` on all-NaN Series/DataFrames is now consistent and no longer depends on whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed, see :ref:`here <whatsnew_0210.api_breaking.bottleneck>`.
55
+
- The behavior of ``sum`` and ``prod`` on all-NaN Series/DataFrames is now consistent and no longer depends on whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed, and ``sum`` and ``prod`` on empty Series now return NaN instead of 0, see :ref:`here <whatsnew_0210.api_breaking.bottleneck>`.
56
56
- Compatibility fixes for pypy, see :ref:`here <whatsnew_0210.pypy>`.
57
57
- Additions to the ``drop``, ``reindex`` and ``rename`` API to make them more consistent, see :ref:`here <whatsnew_0210.enhancements.drop_api>`.
58
58
- Addition of the new methods ``DataFrame.infer_objects`` (see :ref:`here <whatsnew_0210.enhancements.infer_objects>`) and ``GroupBy.pipe`` (see :ref:`here <whatsnew_0210.enhancements.GroupBy_pipe>`).
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.21.0.txt
+32-12
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Highlights include:
12
12
- Integration with `Apache Parquet <https://parquet.apache.org/>`__, including a new top-level :func:`read_parquet` function and :meth:`DataFrame.to_parquet` method, see :ref:`here <whatsnew_0210.enhancements.parquet>`.
13
13
- New user-facing :class:`pandas.api.types.CategoricalDtype` for specifying
14
14
categoricals independent of the data, see :ref:`here <whatsnew_0210.enhancements.categorical_dtype>`.
15
-
- The behavior of ``sum`` and ``prod`` on all-NaN Series/DataFrames is now consistent and no longer depends on whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed, see :ref:`here <whatsnew_0210.api_breaking.bottleneck>`.
15
+
- The behavior of ``sum`` and ``prod`` on all-NaN Series/DataFrames is now consistent and no longer depends on whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed, and ``sum`` and ``prod`` on empty Series now return NaN instead of 0, see :ref:`here <whatsnew_0210.api_breaking.bottleneck>`.
16
16
- Compatibility fixes for pypy, see :ref:`here <whatsnew_0210.pypy>`.
17
17
- Additions to the ``drop``, ``reindex`` and ``rename`` API to make them more consistent, see :ref:`here <whatsnew_0210.enhancements.drop_api>`.
18
18
- Addition of the new methods ``DataFrame.infer_objects`` (see :ref:`here <whatsnew_0210.enhancements.infer_objects>`) and ``GroupBy.pipe`` (see :ref:`here <whatsnew_0210.enhancements.GroupBy_pipe>`).
@@ -369,47 +369,47 @@ Additionally, support has been dropped for Python 3.4 (:issue:`15251`).
369
369
370
370
.. _whatsnew_0210.api_breaking.bottleneck:
371
371
372
-
Sum/Prod of all-NaN Series/DataFrames is now consistently NaN
The behavior of ``sum`` and ``prod`` on all-NaN Series/DataFrames no longer depends on
376
-
whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed. (:issue:`9422`, :issue:`15507`).
376
+
whether `bottleneck <http://berkeleyanalytics.com/bottleneck>`__ is installed, and return value of ``sum`` and ``prod`` on an empty Series has changed (:issue:`9422`, :issue:`15507`).
377
377
378
378
Calling ``sum`` or ``prod`` on an empty or all-``NaN`` ``Series``, or columns of a ``DataFrame``, will result in ``NaN``. See the :ref:`docs <missing_data.numeric_sum>`.
379
379
380
380
.. ipython:: python
381
381
382
382
s = Series([np.nan])
383
383
384
-
Previously NO ``bottleneck``
384
+
Previously WITHOUT ``bottleneck`` installed:
385
385
386
386
.. code-block:: ipython
387
387
388
388
In [2]: s.sum()
389
389
Out[2]: np.nan
390
390
391
-
Previously WITH ``bottleneck``
391
+
Previously WITH ``bottleneck``:
392
392
393
393
.. code-block:: ipython
394
394
395
395
In [2]: s.sum()
396
396
Out[2]: 0.0
397
397
398
-
New Behavior, without regard to the bottleneck installation.
398
+
New Behavior, without regard to the bottleneck installation:
399
399
400
400
.. ipython:: python
401
401
402
402
s.sum()
403
403
404
-
Note that this also changes the sum of an empty ``Series``
405
-
406
-
Previously regardless of ``bottlenck``
404
+
Note that this also changes the sum of an empty ``Series``. Previously this always returned 0 regardless of a ``bottlenck`` installation:
407
405
408
406
.. code-block:: ipython
409
407
410
408
In [1]: pd.Series([]).sum()
411
409
Out[1]: 0
412
410
411
+
but for consistency with the all-NaN case, this was changed to return NaN as well:
412
+
413
413
.. ipython:: python
414
414
415
415
pd.Series([]).sum()
@@ -877,6 +877,28 @@ New Behavior:
877
877
878
878
pd.interval_range(start=0, end=4)
879
879
880
+
.. _whatsnew_0210.api.mpl_converters:
881
+
882
+
No Automatic Matplotlib Converters
883
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
884
+
885
+
Pandas no longer registers our ``date``, ``time``, ``datetime``,
886
+
``datetime64``, and ``Period`` converters with matplotlib when pandas is
887
+
imported. Matplotlib plot methods (``plt.plot``, ``ax.plot``, ...), will not
888
+
nicely format the x-axis for ``DatetimeIndex`` or ``PeriodIndex`` values. You
Pandas built-in ``Series.plot`` and ``DataFrame.plot`` *will* register these
900
+
converters on first-use (:issue:17710).
901
+
880
902
.. _whatsnew_0210.api:
881
903
882
904
Other API Changes
@@ -900,8 +922,6 @@ Other API Changes
900
922
- Renamed non-functional ``index`` to ``index_col`` in :func:`read_stata` to improve API consistency (:issue:`16342`)
901
923
- Bug in :func:`DataFrame.drop` caused boolean labels ``False`` and ``True`` to be treated as labels 0 and 1 respectively when dropping indices from a numeric index. This will now raise a ValueError (:issue:`16877`)
902
924
- Restricted DateOffset keyword arguments. Previously, ``DateOffset`` subclasses allowed arbitrary keyword arguments which could lead to unexpected behavior. Now, only valid arguments will be accepted. (:issue:`17176`).
903
-
- Pandas no longer registers matplotlib converters on import. The converters
904
-
will be registered and used when the first plot is draw (:issue:`17710`)
0 commit comments