From 4d6a40a1ed8b73c8b036615360d555736d6a1b2f Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Tue, 16 Aug 2016 05:59:23 -0400 Subject: [PATCH] TST: move SparseList to deprecate in api, xref #14007 DOC: whatsnew fixes --- doc/source/whatsnew/v0.19.0.txt | 17 +++++++++-------- pandas/api/tests/test_api.py | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/source/whatsnew/v0.19.0.txt b/doc/source/whatsnew/v0.19.0.txt index a3b1007698194..9cac79288ea89 100644 --- a/doc/source/whatsnew/v0.19.0.txt +++ b/doc/source/whatsnew/v0.19.0.txt @@ -411,7 +411,7 @@ Other enhancements df.sort_values(by='row2', axis=1) - Added documentation to :ref:`I/O` regarding the perils of reading in columns with mixed dtypes and how to handle it (:issue:`13746`) -- Raise ImportError for in the sql functions when sqlalchemy is not installed and a connection string is used (:issue:`11920`). +- Raise ``ImportError`` in the sql functions when ``sqlalchemy`` is not installed and a connection string is used (:issue:`11920`). .. _whatsnew_0190.api: @@ -505,10 +505,9 @@ New Behavior: .. _whatsnew_0190.api.to_datetime_coerce: -``.to_datetime()`` when coercing -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +``.to_datetime()`` changes +^^^^^^^^^^^^^^^^^^^^^^^^^^ -A bug is fixed in ``.to_datetime()`` when passing integers or floats, and no ``unit`` and ``errors='coerce'`` (:issue:`13180`). Previously if ``.to_datetime()`` encountered mixed integers/floats and strings, but no datetimes with ``errors='coerce'`` it would convert all to ``NaT``. Previous Behavior: @@ -524,6 +523,12 @@ This will now convert integers/floats with the default unit of ``ns``. pd.to_datetime([1, 'foo'], errors='coerce') +- Bug in ``pd.to_datetime()`` when passing integers or floats, and no ``unit`` and ``errors='coerce'`` (:issue:`13180`). +- Bug in ``pd.to_datetime()`` when passing invalid datatypes (e.g. bool); will now respect the ``errors`` keyword (:issue:`13176`) +- Bug in ``pd.to_datetime()`` which overflowed on ``int8``, and ``int16`` dtypes (:issue:`13451`) +- Bug in ``pd.to_datetime()`` raise ``AttributeError`` with NaN and the other string is not valid when errors='ignore' (:issue:`12424`) +- Bug in ``pd.to_datetime()`` did not cast floats correctly when ``unit`` was specified, resulting in truncated datetime (:issue:`13845`) + .. _whatsnew_0190.api.merging: Merging changes @@ -929,8 +934,6 @@ Bug Fixes - Bug ``Series.isnull`` and ``Series.notnull`` ignore ``Period('NaT')`` (:issue:`13737`) - Bug ``Series.fillna`` and ``Series.dropna`` don't affect to ``Period('NaT')`` (:issue:`13737`) -- Bug in ``pd.to_datetime()`` when passing invalid datatypes (e.g. bool); will now respect the ``errors`` keyword (:issue:`13176`) -- Bug in ``pd.to_datetime()`` which overflowed on ``int8``, and ``int16`` dtypes (:issue:`13451`) - Bug in extension dtype creation where the created types were not is/identical (:issue:`13285`) - Bug in ``.resample(..)`` where incorrect warnings were triggered by IPython introspection (:issue:`13618`) - Bug in ``NaT`` - ``Period`` raises ``AttributeError`` (:issue:`13071`) @@ -945,7 +948,6 @@ Bug Fixes - Bug in ``.set_index`` raises ``AmbiguousTimeError`` if new index contains DST boundary and multi levels (:issue:`12920`) - Bug in ``.shift`` raises ``AmbiguousTimeError`` if data contains datetime near DST boundary (:issue:`13926`) - Bug in ``pd.read_hdf()`` returns incorrect result when a ``DataFrame`` with a ``categorical`` column and a query which doesn't match any values (:issue:`13792`) -- Bug in ``pd.to_datetime()`` raise ``AttributeError`` with NaN and the other string is not valid when errors='ignore' (:issue:`12424`) - Bug in ``Series`` comparison operators when dealing with zero dim NumPy arrays (:issue:`13006`) @@ -992,5 +994,4 @@ Bug Fixes - Bug in ``Index`` raises ``KeyError`` displaying incorrect column when column is not in the df and columns contains duplicate values (:issue:`13822`) - Bug in ``Period`` and ``PeriodIndex`` creating wrong dates when frequency has combined offset aliases (:issue:`13874`) -- Bug in ``pd.to_datetime()`` did not cast floats correctly when ``unit`` was specified, resulting in truncated datetime (:issue:`13845`) - Bug in ``.to_string()`` when called with an integer ``line_width`` and ``index=False`` raises an UnboundLocalError exception because ``idx`` referenced before assignment. diff --git a/pandas/api/tests/test_api.py b/pandas/api/tests/test_api.py index 2537354091ad1..b1bbf18df3e06 100644 --- a/pandas/api/tests/test_api.py +++ b/pandas/api/tests/test_api.py @@ -58,10 +58,11 @@ class TestPDApi(Base, tm.TestCase): # these are already deprecated; awaiting removal deprecated_classes = ['TimeSeries', 'WidePanel', - 'SparseTimeSeries', 'Panel4D'] + 'SparseTimeSeries', 'Panel4D', + 'SparseList'] # these should be deperecated in the future - deprecated_classes_in_future = ['SparseList', 'Term', 'Panel'] + deprecated_classes_in_future = ['Term', 'Panel'] # these should be removed from top-level namespace remove_classes_from_top_level_namespace = ['Expr']