Skip to content

Commit 42e1419

Browse files
kylekepplerKeppler, Kyle
authored andcommitted
DOC: fixes for assert_frame_equal check_freq argument (pandas-dev#38471)
* add versionadded to asset_frame_equals check_freq * Add whats new for assert_frame_equal check_freq arg. * fix backticks * move whatnew to 1.2.1 * whitespace * rename to API breaking section Co-authored-by: Keppler, Kyle <[email protected]>
1 parent a5dc842 commit 42e1419

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

doc/source/whatsnew/v1.2.1.rst

+14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ including other versions of pandas.
1010

1111
.. ---------------------------------------------------------------------------
1212
13+
.. _whatsnew_121.api_breaking:
14+
15+
Backwards incompatible API changes
16+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17+
18+
.. _whatsnew_121.api_breaking.testing.assert_frame_equal:
19+
20+
Added ``check_freq`` argument to ``testing.assert_frame_equal``
21+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
23+
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`.
24+
25+
.. ---------------------------------------------------------------------------
26+
1327
.. _whatsnew_121.regressions:
1428

1529
Fixed regressions

pandas/_testing/asserters.py

+2
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,8 @@ def assert_frame_equal(
11281128
(same as in columns) - same labels must be with the same data.
11291129
check_freq : bool, default True
11301130
Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex.
1131+
1132+
.. versionadded:: 1.1.0
11311133
check_flags : bool, default True
11321134
Whether to check the `flags` attribute.
11331135
rtol : float, default 1e-5

0 commit comments

Comments
 (0)