From 95a90e0108248ed9aa81d227c54d7bbc15309913 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 Jul 2015 11:01:43 +0200 Subject: [PATCH 1/2] DOC: some formatting fixes in whatsnew --- doc/source/whatsnew/v0.17.0.txt | 52 +++++++++++++++++---------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/doc/source/whatsnew/v0.17.0.txt b/doc/source/whatsnew/v0.17.0.txt index e77532b2fe432..42b8d03ac5863 100644 --- a/doc/source/whatsnew/v0.17.0.txt +++ b/doc/source/whatsnew/v0.17.0.txt @@ -86,20 +86,20 @@ Other enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _whatsnew_0170.api_breaking.convert_objects: + Changes to convert_objects ^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. _whatsnew_0170.api_breaking.convert_objects: - - ``DataFrame.convert_objects`` keyword arguments have been shortened. (:issue:`10265`) -===================== ============= -Old New -===================== ============= -``convert_dates`` ``datetime`` -``convert_numeric`` ``numeric`` -``convert_timedelta`` ``timedelta`` -===================== ============= + ===================== ============= + Old New + ===================== ============= + ``convert_dates`` ``datetime`` + ``convert_numeric`` ``numeric`` + ``convert_timedelta`` ``timedelta`` + ===================== ============= - Coercing types with ``DataFrame.convert_objects`` is now implemented using the keyword argument ``coerce=True``. Previously types were coerced by setting a @@ -152,14 +152,19 @@ Old New to do nothing, and so it is necessary to pass at least one conversion target in the method call. +.. _whatsnew_0170.api_breaking.other: + +Other API Changes +^^^^^^^^^^^^^^^^^ + - Operator equal on Index should behavior similarly to Series (:issue:`9947`) -Starting in v0.17.0, comparing ``Index`` objects of different lengths will raise -a ``ValueError``. This is to be consistent with the behavior of ``Series``. + Starting in v0.17.0, comparing ``Index`` objects of different lengths will raise + a ``ValueError``. This is to be consistent with the behavior of ``Series``. -Previous behavior: + Previous behavior: -.. code-block:: python + .. code-block:: python In [2]: pd.Index([1, 2, 3]) == pd.Index([1, 4, 5]) Out[2]: array([ True, False, False], dtype=bool) @@ -183,9 +188,9 @@ Previous behavior: In [7]: pd.Series([1, 2, 3]) == pd.Series([1, 2]) ValueError: Series lengths must match to compare -New behavior: + New behavior: -.. code-block:: python + .. code-block:: python In [8]: pd.Index([1, 2, 3]) == pd.Index([1, 4, 5]) Out[8]: array([ True, False, False], dtype=bool) @@ -209,23 +214,19 @@ New behavior: In [13]: pd.Series([1, 2, 3]) == pd.Series([1, 2]) ValueError: Series lengths must match to compare -Note that this is different from the ``numpy`` behavior where a comparison can -be broadcast: + Note that this is different from the ``numpy`` behavior where a comparison can + be broadcast: -.. ipython:: python + .. ipython:: python np.array([1, 2, 3]) == np.array([1]) -or it can return False if broadcasting can not be done: + or it can return False if broadcasting can not be done: -.. ipython:: python + .. ipython:: python np.array([1, 2, 3]) == np.array([1, 2]) -.. _whatsnew_0170.api_breaking.other: - -Other API Changes -^^^^^^^^^^^^^^^^^ - Enable writing Excel files in :ref:`memory <_io.excel_writing_buffer>` using StringIO/BytesIO (:issue:`7074`) - Enable serialization of lists and dicts to strings in ExcelWriter (:issue:`8188`) - Allow passing `kwargs` to the interpolation methods (:issue:`10378`). @@ -265,8 +266,8 @@ as well as the ``.sum()`` operation. Releasing of the GIL could benefit an application that uses threads for user interactions (e.g. ``QT``), or performaning multi-threaded computations. A nice example of a library that can handle these types of computation-in-parallel is the dask_ library. -.. _whatsnew_0170.performance: +.. _whatsnew_0170.performance: Performance Improvements ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -277,6 +278,7 @@ Performance Improvements - Significantly improved performance of indexing ``MultiIndex`` with slicers (:issue:`10287`) - Improved performance of ``Series.isin`` for datetimelike/integer Series (:issue:`10287`) + .. _whatsnew_0170.bug_fixes: Bug Fixes From f1598d3e6f10b92c72090a431a972e7628e76bb5 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 Jul 2015 11:15:59 +0200 Subject: [PATCH 2/2] DOC: ignore deprecation warnings for convert_objects (GH10265) --- doc/source/whatsnew/v0.11.0.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.11.0.txt b/doc/source/whatsnew/v0.11.0.txt index befdf848ad23b..50b74fc5af090 100644 --- a/doc/source/whatsnew/v0.11.0.txt +++ b/doc/source/whatsnew/v0.11.0.txt @@ -103,6 +103,7 @@ Conversion Mixed Conversion .. ipython:: python + :okwarning: df3['D'] = '1.' df3['E'] = '1' @@ -116,6 +117,7 @@ Mixed Conversion Forcing Date coercion (and setting ``NaT`` when not datelike) .. ipython:: python + :okwarning: from datetime import datetime s = Series([datetime(2001,1,1,0,0), 'foo', 1.0, 1, @@ -328,4 +330,3 @@ Enhancements See the :ref:`full release notes ` or issue tracker on GitHub for a complete list. -