From c52364dd731f155876bdd4a38b5449d7a747f373 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 08:10:07 +0000 Subject: [PATCH 01/12] added ambiguous keyword in _generate_range00 freq specified --- pandas/core/arrays/datetimes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index d674b1c476d2c..ed375ee173ed1 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -418,9 +418,9 @@ def _generate_range( # index is localized datetime64 array -> have to convert # start/end as well to compare if start is not None: - start = start.tz_localize(tz).asm8 + start = start.tz_localize(tz, ambiguous).asm8 if end is not None: - end = end.tz_localize(tz).asm8 + end = end.tz_localize(tz, ambiguous).asm8 else: # Create a linearly spaced date_range in local time # Nanosecond-granularity timestamps aren't always correctly From f94deb1959d6d7ba0941a315f75dfc7c8edf4e0c Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 08:14:01 +0000 Subject: [PATCH 02/12] added test --- .../indexes/datetimes/test_constructors.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandas/tests/indexes/datetimes/test_constructors.py b/pandas/tests/indexes/datetimes/test_constructors.py index c150e7901c86a..98cd3491fffdb 100644 --- a/pandas/tests/indexes/datetimes/test_constructors.py +++ b/pandas/tests/indexes/datetimes/test_constructors.py @@ -787,6 +787,23 @@ def test_construction_with_nat_and_tzlocal(self): expected = DatetimeIndex([Timestamp("2018", tz=tz), pd.NaT]) tm.assert_index_equal(result, expected) + def test_constructor_with_ambiguous_keyword_arg(self): + # GH 35297 + + timezone = "America/New_York" + start = pd.Timestamp(year=2020, month=11, day=1, hour=1).tz_localize( + timezone, ambiguous=False + ) + result = pd.date_range(start, periods=2, ambiguous=False) + + expected = DatetimeIndex( + ["2020-11-01 01:00:00", "2020-11-02 01:00:00"], + dtype="datetime64[ns, America/New_York]", + freq="D", + ambiguous=False, + ) + tm.assert_index_equal(result, expected) + def test_constructor_no_precision_raises(self): # GH-24753, GH-24739 From ef37d52b9c6923f2f547908d44a97f15394c511b Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 08:17:42 +0000 Subject: [PATCH 03/12] updated whatsnew --- doc/source/whatsnew/v1.1.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index 97099ce73354f..007480a8e6192 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -941,7 +941,7 @@ Timezones ^^^^^^^^^ - Bug in :func:`to_datetime` with ``infer_datetime_format=True`` where timezone names (e.g. ``UTC``) would not be parsed correctly (:issue:`33133`) -- +- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) Numeric From 0fd04dc33ad5a475d2195151ab84fdc65381be12 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 16:34:32 +0000 Subject: [PATCH 04/12] added a test for end --- .../indexes/datetimes/test_constructors.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pandas/tests/indexes/datetimes/test_constructors.py b/pandas/tests/indexes/datetimes/test_constructors.py index 98cd3491fffdb..7aa89ea4c3986 100644 --- a/pandas/tests/indexes/datetimes/test_constructors.py +++ b/pandas/tests/indexes/datetimes/test_constructors.py @@ -790,18 +790,27 @@ def test_construction_with_nat_and_tzlocal(self): def test_constructor_with_ambiguous_keyword_arg(self): # GH 35297 - timezone = "America/New_York" - start = pd.Timestamp(year=2020, month=11, day=1, hour=1).tz_localize( - timezone, ambiguous=False - ) - result = pd.date_range(start, periods=2, ambiguous=False) - expected = DatetimeIndex( ["2020-11-01 01:00:00", "2020-11-02 01:00:00"], dtype="datetime64[ns, America/New_York]", freq="D", ambiguous=False, ) + + # ambiguous keyword in start + timezone = "America/New_York" + start = pd.Timestamp(year=2020, month=11, day=1, hour=1).tz_localize( + timezone, ambiguous=False + ) + result = pd.date_range(start=start, periods=2, ambiguous=False) + tm.assert_index_equal(result, expected) + + # ambiguous keyword in end + timezone = "America/New_York" + end = pd.Timestamp(year=2020, month=11, day=2, hour=1).tz_localize( + timezone, ambiguous=False + ) + result = pd.date_range(end=end, periods=2, ambiguous=False) tm.assert_index_equal(result, expected) def test_constructor_no_precision_raises(self): From 2dbcda64ed781464c7d333b09cca218d6c51deab Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 16:39:21 +0000 Subject: [PATCH 05/12] add nonexistent arg to tz_localize --- pandas/core/arrays/datetimes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index ed375ee173ed1..8b2bb7832b5d0 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -418,9 +418,9 @@ def _generate_range( # index is localized datetime64 array -> have to convert # start/end as well to compare if start is not None: - start = start.tz_localize(tz, ambiguous).asm8 + start = start.tz_localize(tz, ambiguous, nonexistent).asm8 if end is not None: - end = end.tz_localize(tz, ambiguous).asm8 + end = end.tz_localize(tz, ambiguous, nonexistent).asm8 else: # Create a linearly spaced date_range in local time # Nanosecond-granularity timestamps aren't always correctly From 51f705e8935f06000b2b59b37781a39beb6e0f25 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 17:18:42 +0000 Subject: [PATCH 06/12] added test for nonexistent kw in date_range --- .../indexes/datetimes/test_constructors.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pandas/tests/indexes/datetimes/test_constructors.py b/pandas/tests/indexes/datetimes/test_constructors.py index 7aa89ea4c3986..9a855a1624520 100644 --- a/pandas/tests/indexes/datetimes/test_constructors.py +++ b/pandas/tests/indexes/datetimes/test_constructors.py @@ -813,6 +813,39 @@ def test_constructor_with_ambiguous_keyword_arg(self): result = pd.date_range(end=end, periods=2, ambiguous=False) tm.assert_index_equal(result, expected) + def test_constructor_with_nonexistent_keyword_arg(self): + # GH 35297 + + timezone = "Europe/Warsaw" + + # nonexistent keyword in start + start = pd.Timestamp("2015-03-29 02:30:00").tz_localize( + timezone, nonexistent="shift_forward" + ) + result = pd.date_range(start=start, periods=2, freq="H") + expected = DatetimeIndex( + [ + pd.Timestamp("2015-03-29 03:00:00+02:00", tz=timezone), + pd.Timestamp("2015-03-29 04:00:00+02:00", tz=timezone), + ] + ) + + tm.assert_index_equal(result, expected) + + # nonexistent keyword in end + end = pd.Timestamp("2015-03-29 02:30:00").tz_localize( + timezone, nonexistent="shift_forward" + ) + result = pd.date_range(end=end, periods=2, freq="H") + expected = DatetimeIndex( + [ + pd.Timestamp("2015-03-29 01:00:00+01:00", tz=timezone), + pd.Timestamp("2015-03-29 03:00:00+02:00", tz=timezone), + ] + ) + + tm.assert_index_equal(result, expected) + def test_constructor_no_precision_raises(self): # GH-24753, GH-24739 From ab0ee3391338480ae61f29c00c483d7f4f734572 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 18:14:50 +0000 Subject: [PATCH 07/12] created whatsnew 1.2 --- doc/source/whatsnew/v1.2.0.rst | 209 +++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 doc/source/whatsnew/v1.2.0.rst diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst new file mode 100644 index 0000000000000..65600faad7c8f --- /dev/null +++ b/doc/source/whatsnew/v1.2.0.rst @@ -0,0 +1,209 @@ +.. _whatsnew_120: + +What's new in 1.2.0 (??) +------------------------ + +These are the changes in pandas 1.2.0. See :ref:`release` for a full changelog +including other versions of pandas. + +{{ header }} + +.. --------------------------------------------------------------------------- + +Enhancements +~~~~~~~~~~~~ + + +.. _whatsnew_110.enhancements.other: + +Other enhancements +^^^^^^^^^^^^^^^^^^ + +.. --------------------------------------------------------------------------- + +.. _whatsnew_110.notable_bug_fixes: + +Notable bug fixes +~~~~~~~~~~~~~~~~~ + +These are bug fixes that might have notable behavior changes. + + +Increased minimum versions for dependencies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some minimum supported versions of dependencies were updated (:issue:`33718`, :issue:`29766`, :issue:`29723`, pytables >= 3.4.3). +If installed, we now require: + ++-----------------+-----------------+----------+---------+ +| Package | Minimum Version | Required | Changed | ++=================+=================+==========+=========+ +| numpy | 1.15.4 | X | X | ++-----------------+-----------------+----------+---------+ +| pytz | 2015.4 | X | | ++-----------------+-----------------+----------+---------+ +| python-dateutil | 2.7.3 | X | X | ++-----------------+-----------------+----------+---------+ +| bottleneck | 1.2.1 | | | ++-----------------+-----------------+----------+---------+ +| numexpr | 2.6.2 | | | ++-----------------+-----------------+----------+---------+ +| pytest (dev) | 4.0.2 | | | ++-----------------+-----------------+----------+---------+ + +For `optional libraries `_ the general recommendation is to use the latest version. +The following table lists the lowest version per library that is currently being tested throughout the development of pandas. +Optional libraries below the lowest tested version may still work, but are not considered supported. + ++-----------------+-----------------+---------+ +| Package | Minimum Version | Changed | ++=================+=================+=========+ +| beautifulsoup4 | 4.6.0 | | ++-----------------+-----------------+---------+ +| fastparquet | 0.3.2 | | ++-----------------+-----------------+---------+ +| fsspec | 0.7.4 | | ++-----------------+-----------------+---------+ +| gcsfs | 0.6.0 | X | ++-----------------+-----------------+---------+ +| lxml | 3.8.0 | | ++-----------------+-----------------+---------+ +| matplotlib | 2.2.2 | | ++-----------------+-----------------+---------+ +| numba | 0.46.0 | | ++-----------------+-----------------+---------+ +| openpyxl | 2.5.7 | | ++-----------------+-----------------+---------+ +| pyarrow | 0.13.0 | | ++-----------------+-----------------+---------+ +| pymysql | 0.7.1 | | ++-----------------+-----------------+---------+ +| pytables | 3.4.3 | X | ++-----------------+-----------------+---------+ +| s3fs | 0.4.0 | X | ++-----------------+-----------------+---------+ +| scipy | 1.2.0 | X | ++-----------------+-----------------+---------+ +| sqlalchemy | 1.1.4 | | ++-----------------+-----------------+---------+ +| xarray | 0.8.2 | | ++-----------------+-----------------+---------+ +| xlrd | 1.1.0 | | ++-----------------+-----------------+---------+ +| xlsxwriter | 0.9.8 | | ++-----------------+-----------------+---------+ +| xlwt | 1.2.0 | | ++-----------------+-----------------+---------+ +| pandas-gbq | 1.2.0 | X | ++-----------------+-----------------+---------+ + +See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more. + +Development Changes +^^^^^^^^^^^^^^^^^^^ + +- + +.. _whatsnew_110.deprecations: + +Deprecations +~~~~~~~~~~~~ + +- + +.. --------------------------------------------------------------------------- + + +.. _whatsnew_110.performance: + +Performance improvements +~~~~~~~~~~~~~~~~~~~~~~~~ + +- + +.. --------------------------------------------------------------------------- + +.. _whatsnew_110.bug_fixes: + +Bug fixes +~~~~~~~~~ + + +Categorical +^^^^^^^^^^^ +- + +Datetimelike +^^^^^^^^^^^^ +- + +Timedelta +^^^^^^^^^ +- + +Timezones +^^^^^^^^^ + + +Numeric +^^^^^^^ +- + +Conversion +^^^^^^^^^^ +- +Strings +^^^^^^^ +- + +Interval +^^^^^^^^ +- + +Indexing +^^^^^^^^ +- + +Missing +^^^^^^^ +- + +MultiIndex +^^^^^^^^^^ +- + +I/O +^^^ +- + +Plotting +^^^^^^^^ +- + +Groupby/resample/rolling +^^^^^^^^^^^^^^^^^^^^^^^^ +- + +Reshaping +^^^^^^^^^ +- + +Sparse +^^^^^^ +- + +ExtensionArray +^^^^^^^^^^^^^^ +- + +Other +^^^^^ +- + +.. --------------------------------------------------------------------------- + +.. _whatsnew_120.contributors: + +Contributors +~~~~~~~~~~~~ + From 828fe2dc4ea197233e842f6dd208e6d6db403889 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 18:16:09 +0000 Subject: [PATCH 08/12] moved GH35297 from whatsnew 1.1 -> 1.2 --- doc/source/whatsnew/v1.1.0.rst | 1 - doc/source/whatsnew/v1.2.0.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index 007480a8e6192..9d7bd0d78efbb 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -941,7 +941,6 @@ Timezones ^^^^^^^^^ - Bug in :func:`to_datetime` with ``infer_datetime_format=True`` where timezone names (e.g. ``UTC``) would not be parsed correctly (:issue:`33133`) -- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) Numeric diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 65600faad7c8f..5f5d6b52529e5 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -143,7 +143,7 @@ Timedelta Timezones ^^^^^^^^^ - +- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) Numeric ^^^^^^^ From fb780d6b0a2b8d69e0f7989c3f4f4598b0109a21 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 18:20:48 +0000 Subject: [PATCH 09/12] fixed whatsnew 1.2 --- doc/source/whatsnew/v1.2.0.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 5f5d6b52529e5..523b0811c1db7 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -14,14 +14,14 @@ Enhancements ~~~~~~~~~~~~ -.. _whatsnew_110.enhancements.other: +.. _whatsnew_120.enhancements.other: Other enhancements ^^^^^^^^^^^^^^^^^^ .. --------------------------------------------------------------------------- -.. _whatsnew_110.notable_bug_fixes: +.. _whatsnew_120.notable_bug_fixes: Notable bug fixes ~~~~~~~~~~~~~~~~~ @@ -32,17 +32,17 @@ These are bug fixes that might have notable behavior changes. Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Some minimum supported versions of dependencies were updated (:issue:`33718`, :issue:`29766`, :issue:`29723`, pytables >= 3.4.3). +Some minimum supported versions of dependencies were updated (). If installed, we now require: +-----------------+-----------------+----------+---------+ | Package | Minimum Version | Required | Changed | +=================+=================+==========+=========+ -| numpy | 1.15.4 | X | X | +| numpy | 1.15.4 | X | | +-----------------+-----------------+----------+---------+ | pytz | 2015.4 | X | | +-----------------+-----------------+----------+---------+ -| python-dateutil | 2.7.3 | X | X | +| python-dateutil | 2.7.3 | X | | +-----------------+-----------------+----------+---------+ | bottleneck | 1.2.1 | | | +-----------------+-----------------+----------+---------+ @@ -64,7 +64,7 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | fsspec | 0.7.4 | | +-----------------+-----------------+---------+ -| gcsfs | 0.6.0 | X | +| gcsfs | 0.6.0 | | +-----------------+-----------------+---------+ | lxml | 3.8.0 | | +-----------------+-----------------+---------+ @@ -78,11 +78,11 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | pymysql | 0.7.1 | | +-----------------+-----------------+---------+ -| pytables | 3.4.3 | X | +| pytables | 3.4.3 | | +-----------------+-----------------+---------+ -| s3fs | 0.4.0 | X | +| s3fs | 0.4.0 | | +-----------------+-----------------+---------+ -| scipy | 1.2.0 | X | +| scipy | 1.2.0 | | +-----------------+-----------------+---------+ | sqlalchemy | 1.1.4 | | +-----------------+-----------------+---------+ @@ -94,7 +94,7 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | xlwt | 1.2.0 | | +-----------------+-----------------+---------+ -| pandas-gbq | 1.2.0 | X | +| pandas-gbq | 1.2.0 | | +-----------------+-----------------+---------+ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more. @@ -104,7 +104,7 @@ Development Changes - -.. _whatsnew_110.deprecations: +.. _whatsnew_120.deprecations: Deprecations ~~~~~~~~~~~~ @@ -114,7 +114,7 @@ Deprecations .. --------------------------------------------------------------------------- -.. _whatsnew_110.performance: +.. _whatsnew_120.performance: Performance improvements ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -123,7 +123,7 @@ Performance improvements .. --------------------------------------------------------------------------- -.. _whatsnew_110.bug_fixes: +.. _whatsnew_120.bug_fixes: Bug fixes ~~~~~~~~~ From 54389028b242305b25c363035a356b3599434f46 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Thu, 16 Jul 2020 19:00:29 +0000 Subject: [PATCH 10/12] removed trailing whitespaces --- doc/source/whatsnew/v1.2.0.rst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 523b0811c1db7..98286df7be4fb 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -109,7 +109,7 @@ Development Changes Deprecations ~~~~~~~~~~~~ -- +- .. --------------------------------------------------------------------------- @@ -119,7 +119,7 @@ Deprecations Performance improvements ~~~~~~~~~~~~~~~~~~~~~~~~ -- +- .. --------------------------------------------------------------------------- @@ -131,15 +131,15 @@ Bug fixes Categorical ^^^^^^^^^^^ -- +- Datetimelike ^^^^^^^^^^^^ -- +- Timedelta ^^^^^^^^^ -- +- Timezones ^^^^^^^^^ @@ -147,26 +147,27 @@ Timezones Numeric ^^^^^^^ -- +- Conversion ^^^^^^^^^^ -- +- + Strings ^^^^^^^ -- +- Interval ^^^^^^^^ -- +- Indexing ^^^^^^^^ -- +- Missing ^^^^^^^ -- +- MultiIndex ^^^^^^^^^^ @@ -178,7 +179,7 @@ I/O Plotting ^^^^^^^^ -- +- Groupby/resample/rolling ^^^^^^^^^^^^^^^^^^^^^^^^ From ec0aa37ef4d10b5ac7c5f8e7869d5c37467bf34d Mon Sep 17 00:00:00 2001 From: arw2019 Date: Wed, 22 Jul 2020 17:29:39 +0000 Subject: [PATCH 11/12] revert whatsnew changes pending 1.2 --- doc/source/whatsnew/v1.1.0.rst | 4 + doc/source/whatsnew/v1.2.0.rst | 210 --------------------------------- 2 files changed, 4 insertions(+), 210 deletions(-) delete mode 100644 doc/source/whatsnew/v1.2.0.rst diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index a3eefb3c2e4b3..df41b24ee5097 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -922,6 +922,7 @@ Datetimelike resolution which converted to object dtype instead of coercing to ``datetime64[ns]`` dtype when within the timestamp bounds (:issue:`34843`). - The ``freq`` keyword in :class:`Period`, :func:`date_range`, :func:`period_range`, :func:`pd.tseries.frequencies.to_offset` no longer allows tuples, pass as string instead (:issue:`34703`) +- Bug in :meth:`DataFrame.append` when appending a :class:`Series` containing a scalar tz-aware :class:`Timestamp` to an empty :class:`DataFrame` resulted in an object column instead of datetime64[ns, tz] dtype (:issue:`35038`) - ``OutOfBoundsDatetime`` issues an improved error message when timestamp is out of implementation bounds. (:issue:`32967`) Timedelta @@ -941,6 +942,7 @@ Timezones ^^^^^^^^^ - Bug in :func:`to_datetime` with ``infer_datetime_format=True`` where timezone names (e.g. ``UTC``) would not be parsed correctly (:issue:`33133`) +- Numeric @@ -952,6 +954,7 @@ Numeric - Bug in :meth:`DataFrame.count` with ``level="foo"`` and index level ``"foo"`` containing NaNs causes segmentation fault (:issue:`21824`) - Bug in :meth:`DataFrame.diff` with ``axis=1`` returning incorrect results with mixed dtypes (:issue:`32995`) - Bug in :meth:`DataFrame.corr` and :meth:`DataFrame.cov` raising when handling nullable integer columns with ``pandas.NA`` (:issue:`33803`) +- Bug in arithmetic operations between ``DataFrame`` objects with non-overlapping columns with duplicate labels causing an infinite loop (:issue:`35194`) - Bug in :class:`DataFrame` and :class:`Series` addition and subtraction between object-dtype objects and ``datetime64`` dtype objects (:issue:`33824`) - Bug in :meth:`Index.difference` incorrect results when comparing a :class:`Float64Index` and object :class:`Index` (:issue:`35217`) - Bug in :class:`DataFrame` reductions (e.g. ``df.min()``, ``df.max()``) with ``ExtensionArray`` dtypes (:issue:`34520`, :issue:`32651`) @@ -1117,6 +1120,7 @@ Groupby/resample/rolling - Bug in :meth:`DataFrame.groupby` lost index, when one of the ``agg`` keys referenced an empty list (:issue:`32580`) - Bug in :meth:`Rolling.apply` where ``center=True`` was ignored when ``engine='numba'`` was specified (:issue:`34784`) - Bug in :meth:`DataFrame.ewm.cov` was throwing ``AssertionError`` for :class:`MultiIndex` inputs (:issue:`34440`) +- Bug in :meth:`core.groupby.DataFrameGroupBy.quantile` raises ``TypeError`` for non-numeric types rather than dropping columns (:issue:`27892`) - Bug in :meth:`core.groupby.DataFrameGroupBy.transform` when ``func='nunique'`` and columns are of type ``datetime64``, the result would also be of type ``datetime64`` instead of ``int64`` (:issue:`35109`) - Bug in :meth:'DataFrameGroupBy.first' and :meth:'DataFrameGroupBy.last' that would raise an unnecessary ``ValueError`` when grouping on multiple ``Categoricals`` (:issue:`34951`) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst deleted file mode 100644 index 98286df7be4fb..0000000000000 --- a/doc/source/whatsnew/v1.2.0.rst +++ /dev/null @@ -1,210 +0,0 @@ -.. _whatsnew_120: - -What's new in 1.2.0 (??) ------------------------- - -These are the changes in pandas 1.2.0. See :ref:`release` for a full changelog -including other versions of pandas. - -{{ header }} - -.. --------------------------------------------------------------------------- - -Enhancements -~~~~~~~~~~~~ - - -.. _whatsnew_120.enhancements.other: - -Other enhancements -^^^^^^^^^^^^^^^^^^ - -.. --------------------------------------------------------------------------- - -.. _whatsnew_120.notable_bug_fixes: - -Notable bug fixes -~~~~~~~~~~~~~~~~~ - -These are bug fixes that might have notable behavior changes. - - -Increased minimum versions for dependencies -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Some minimum supported versions of dependencies were updated (). -If installed, we now require: - -+-----------------+-----------------+----------+---------+ -| Package | Minimum Version | Required | Changed | -+=================+=================+==========+=========+ -| numpy | 1.15.4 | X | | -+-----------------+-----------------+----------+---------+ -| pytz | 2015.4 | X | | -+-----------------+-----------------+----------+---------+ -| python-dateutil | 2.7.3 | X | | -+-----------------+-----------------+----------+---------+ -| bottleneck | 1.2.1 | | | -+-----------------+-----------------+----------+---------+ -| numexpr | 2.6.2 | | | -+-----------------+-----------------+----------+---------+ -| pytest (dev) | 4.0.2 | | | -+-----------------+-----------------+----------+---------+ - -For `optional libraries `_ the general recommendation is to use the latest version. -The following table lists the lowest version per library that is currently being tested throughout the development of pandas. -Optional libraries below the lowest tested version may still work, but are not considered supported. - -+-----------------+-----------------+---------+ -| Package | Minimum Version | Changed | -+=================+=================+=========+ -| beautifulsoup4 | 4.6.0 | | -+-----------------+-----------------+---------+ -| fastparquet | 0.3.2 | | -+-----------------+-----------------+---------+ -| fsspec | 0.7.4 | | -+-----------------+-----------------+---------+ -| gcsfs | 0.6.0 | | -+-----------------+-----------------+---------+ -| lxml | 3.8.0 | | -+-----------------+-----------------+---------+ -| matplotlib | 2.2.2 | | -+-----------------+-----------------+---------+ -| numba | 0.46.0 | | -+-----------------+-----------------+---------+ -| openpyxl | 2.5.7 | | -+-----------------+-----------------+---------+ -| pyarrow | 0.13.0 | | -+-----------------+-----------------+---------+ -| pymysql | 0.7.1 | | -+-----------------+-----------------+---------+ -| pytables | 3.4.3 | | -+-----------------+-----------------+---------+ -| s3fs | 0.4.0 | | -+-----------------+-----------------+---------+ -| scipy | 1.2.0 | | -+-----------------+-----------------+---------+ -| sqlalchemy | 1.1.4 | | -+-----------------+-----------------+---------+ -| xarray | 0.8.2 | | -+-----------------+-----------------+---------+ -| xlrd | 1.1.0 | | -+-----------------+-----------------+---------+ -| xlsxwriter | 0.9.8 | | -+-----------------+-----------------+---------+ -| xlwt | 1.2.0 | | -+-----------------+-----------------+---------+ -| pandas-gbq | 1.2.0 | | -+-----------------+-----------------+---------+ - -See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more. - -Development Changes -^^^^^^^^^^^^^^^^^^^ - -- - -.. _whatsnew_120.deprecations: - -Deprecations -~~~~~~~~~~~~ - -- - -.. --------------------------------------------------------------------------- - - -.. _whatsnew_120.performance: - -Performance improvements -~~~~~~~~~~~~~~~~~~~~~~~~ - -- - -.. --------------------------------------------------------------------------- - -.. _whatsnew_120.bug_fixes: - -Bug fixes -~~~~~~~~~ - - -Categorical -^^^^^^^^^^^ -- - -Datetimelike -^^^^^^^^^^^^ -- - -Timedelta -^^^^^^^^^ -- - -Timezones -^^^^^^^^^ -- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) - -Numeric -^^^^^^^ -- - -Conversion -^^^^^^^^^^ -- - -Strings -^^^^^^^ -- - -Interval -^^^^^^^^ -- - -Indexing -^^^^^^^^ -- - -Missing -^^^^^^^ -- - -MultiIndex -^^^^^^^^^^ -- - -I/O -^^^ -- - -Plotting -^^^^^^^^ -- - -Groupby/resample/rolling -^^^^^^^^^^^^^^^^^^^^^^^^ -- - -Reshaping -^^^^^^^^^ -- - -Sparse -^^^^^^ -- - -ExtensionArray -^^^^^^^^^^^^^^ -- - -Other -^^^^^ -- - -.. --------------------------------------------------------------------------- - -.. _whatsnew_120.contributors: - -Contributors -~~~~~~~~~~~~ - From 92cce2fcee127bf616ebd48394b47eec51cd09a5 Mon Sep 17 00:00:00 2001 From: arw2019 Date: Wed, 29 Jul 2020 19:02:17 +0000 Subject: [PATCH 12/12] added release note --- doc/source/whatsnew/v1.2.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 2066858e5de86..b16ca0a80c5b4 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -71,7 +71,7 @@ Timedelta Timezones ^^^^^^^^^ -- +- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) -