From 3457f34700725fb87d8e53a8ab1c69404bc780fe Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Mon, 14 Dec 2020 15:52:50 -0500 Subject: [PATCH 1/6] add versionadded to asset_frame_equals check_freq --- pandas/_testing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/_testing.py b/pandas/_testing.py index 469f5e1bed6ba..7f391679f1ea9 100644 --- a/pandas/_testing.py +++ b/pandas/_testing.py @@ -1576,6 +1576,8 @@ def assert_frame_equal( (same as in columns) - same labels must be with the same data. check_freq : bool, default True Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex. + + .. versionadded:: 1.1.0 check_flags : bool, default True Whether to check the `flags` attribute. rtol : float, default 1e-5 From ec49ffdf80f03cd0498bdb631ad822e3fb9647c1 Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Mon, 14 Dec 2020 16:00:58 -0500 Subject: [PATCH 2/6] Add whats new for assert_frame_equal check_freq arg. --- doc/source/whatsnew/v1.1.0.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index e054ac830ce41..9859d07efb6c9 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -342,6 +342,21 @@ Other enhancements - ``compute.use_numba`` now exists as a configuration option that utilizes the numba engine when available (:issue:`33966`, :issue:`35374`) - :meth:`Series.plot` now supports asymmetric error bars. Previously, if :meth:`Series.plot` received a "2xN" array with error values for ``yerr`` and/or ``xerr``, the left/lower values (first row) were mirrored, while the right/upper values (second row) were ignored. Now, the first row represents the left/lower error values and the second row the right/upper error values. (:issue:`9536`) + +.. --------------------------------------------------------------------------- + +.. _whatsnew_110.api_breaking: + +Backwards incompatible API changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _whatsnew_110.api_breaking._testing.assert_frame_equal: + +Added ``check_freq`` argument to ``assert_frame_equal`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``check_freq`` argument was added to :func:`assert_frame_equal` and defaults to ``True``. :func:`assert_frame_equal` now raises `AssertionError` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`assert_frame_equal`. + .. --------------------------------------------------------------------------- .. _whatsnew_110.notable_bug_fixes: From 0270726d38a5dc2e92ec7ecbc61be745c1547aab Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Mon, 14 Dec 2020 16:29:39 -0500 Subject: [PATCH 3/6] fix backticks --- 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 9859d07efb6c9..a36c444e6665f 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -355,7 +355,7 @@ Backwards incompatible API changes Added ``check_freq`` argument to ``assert_frame_equal`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The ``check_freq`` argument was added to :func:`assert_frame_equal` and defaults to ``True``. :func:`assert_frame_equal` now raises `AssertionError` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`assert_frame_equal`. +The ``check_freq`` argument was added to :func:`assert_frame_equal` and defaults to ``True``. :func:`assert_frame_equal` now raises ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`assert_frame_equal`. .. --------------------------------------------------------------------------- From 143328833847b5e05ea4f1d422985f10d21c604e Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Thu, 31 Dec 2020 17:49:22 -0500 Subject: [PATCH 4/6] move whatnew to 1.2.1 --- doc/source/whatsnew/v1.1.0.rst | 14 -------------- doc/source/whatsnew/v1.2.1.rst | 12 ++++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index a36c444e6665f..5eb38b6950938 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -343,20 +343,6 @@ Other enhancements - :meth:`Series.plot` now supports asymmetric error bars. Previously, if :meth:`Series.plot` received a "2xN" array with error values for ``yerr`` and/or ``xerr``, the left/lower values (first row) were mirrored, while the right/upper values (second row) were ignored. Now, the first row represents the left/lower error values and the second row the right/upper error values. (:issue:`9536`) -.. --------------------------------------------------------------------------- - -.. _whatsnew_110.api_breaking: - -Backwards incompatible API changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. _whatsnew_110.api_breaking._testing.assert_frame_equal: - -Added ``check_freq`` argument to ``assert_frame_equal`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``check_freq`` argument was added to :func:`assert_frame_equal` and defaults to ``True``. :func:`assert_frame_equal` now raises ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`assert_frame_equal`. - .. --------------------------------------------------------------------------- .. _whatsnew_110.notable_bug_fixes: diff --git a/doc/source/whatsnew/v1.2.1.rst b/doc/source/whatsnew/v1.2.1.rst index a1612117072a5..27418b2df11a3 100644 --- a/doc/source/whatsnew/v1.2.1.rst +++ b/doc/source/whatsnew/v1.2.1.rst @@ -10,6 +10,18 @@ including other versions of pandas. .. --------------------------------------------------------------------------- +Enhancements +~~~~~~~~~~~~ + +.. _whatsnew_121.testing.assert_frame_equal: + +Added ``check_freq`` argument to ``testing.assert_frame_equal`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``check_freq`` argument was added to :func:`testing.assert_frame_equal` in pandas 1.1.0 and defaults to ``True``. :func:`testing.assert_frame_equal` now raises ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`testing.assert_frame_equal`. + +.. --------------------------------------------------------------------------- + .. _whatsnew_121.regressions: Fixed regressions From b300319eefd398afe6357d9d9964cbfe69b7ada1 Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Thu, 31 Dec 2020 17:50:14 -0500 Subject: [PATCH 5/6] whitespace --- doc/source/whatsnew/v1.1.0.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index 5eb38b6950938..e054ac830ce41 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -342,7 +342,6 @@ Other enhancements - ``compute.use_numba`` now exists as a configuration option that utilizes the numba engine when available (:issue:`33966`, :issue:`35374`) - :meth:`Series.plot` now supports asymmetric error bars. Previously, if :meth:`Series.plot` received a "2xN" array with error values for ``yerr`` and/or ``xerr``, the left/lower values (first row) were mirrored, while the right/upper values (second row) were ignored. Now, the first row represents the left/lower error values and the second row the right/upper error values. (:issue:`9536`) - .. --------------------------------------------------------------------------- .. _whatsnew_110.notable_bug_fixes: From 4e03a63a9a10a7c5512b27185a583c7b0cdd4076 Mon Sep 17 00:00:00 2001 From: "Keppler, Kyle" Date: Fri, 1 Jan 2021 16:06:06 -0500 Subject: [PATCH 6/6] rename to API breaking section --- doc/source/whatsnew/v1.2.1.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/source/whatsnew/v1.2.1.rst b/doc/source/whatsnew/v1.2.1.rst index 27418b2df11a3..b1f8389420cd9 100644 --- a/doc/source/whatsnew/v1.2.1.rst +++ b/doc/source/whatsnew/v1.2.1.rst @@ -10,13 +10,15 @@ including other versions of pandas. .. --------------------------------------------------------------------------- -Enhancements -~~~~~~~~~~~~ +.. _whatsnew_121.api_breaking: + +Backwards incompatible API changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. _whatsnew_121.testing.assert_frame_equal: +.. _whatsnew_121.api_breaking.testing.assert_frame_equal: Added ``check_freq`` argument to ``testing.assert_frame_equal`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The ``check_freq`` argument was added to :func:`testing.assert_frame_equal` in pandas 1.1.0 and defaults to ``True``. :func:`testing.assert_frame_equal` now raises ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`testing.assert_frame_equal`.