Skip to content

Commit e793c4b

Browse files
Backport PR pandas-dev#38893: doc fix for testing.assert_series_equal check_freq arg (pandas-dev#38942)
1 parent 44f6617 commit e793c4b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/source/whatsnew/v1.2.1.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ including other versions of pandas.
1515
Backwards incompatible API changes
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1717

18-
.. _whatsnew_121.api_breaking.testing.assert_frame_equal:
18+
.. _whatsnew_121.api_breaking.testing.check_freq:
1919

20-
Added ``check_freq`` argument to ``testing.assert_frame_equal``
21-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
Added ``check_freq`` argument to ``testing.assert_frame_equal`` and ``testing.assert_series_equal``
21+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2222

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`.
23+
The ``check_freq`` argument was added to :func:`testing.assert_frame_equal` and :func:`testing.assert_series_equal` in pandas 1.1.0 and defaults to ``True``. :func:`testing.assert_frame_equal` and :func:`testing.assert_series_equal` now raise ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked.
2424

2525
.. ---------------------------------------------------------------------------
2626

pandas/_testing.py

+2
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,8 @@ def assert_series_equal(
13341334
.. versionadded:: 1.0.2
13351335
check_freq : bool, default True
13361336
Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex.
1337+
1338+
.. versionadded:: 1.1.0
13371339
check_flags : bool, default True
13381340
Whether to check the `flags` attribute.
13391341

0 commit comments

Comments
 (0)