From 05fa9583f7bc22796076b7e2a7b94058bebca511 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Sat, 5 Oct 2024 22:43:23 +0530 Subject: [PATCH] DOC: fix SA01, ES01 for pandas.testing.assert_extension_array_equal (#59975) --- ci/code_checks.sh | 1 - pandas/_testing/asserters.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index ad6ea5b0deb9f..16a3a22bc4876 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -187,7 +187,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.plotting.lag_plot RT03,SA01" \ -i "pandas.plotting.scatter_matrix PR07,SA01" \ -i "pandas.set_eng_float_format RT03,SA01" \ - -i "pandas.testing.assert_extension_array_equal SA01" \ -i "pandas.tseries.offsets.BDay PR02,SA01" \ -i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \ -i "pandas.tseries.offsets.BQuarterBegin.n GL08" \ diff --git a/pandas/_testing/asserters.py b/pandas/_testing/asserters.py index bbd5e60a5a812..01c4dcd92ee40 100644 --- a/pandas/_testing/asserters.py +++ b/pandas/_testing/asserters.py @@ -701,6 +701,10 @@ def assert_extension_array_equal( """ Check that left and right ExtensionArrays are equal. + This method compares two ``ExtensionArray`` instances for equality, + including checks for missing values, the dtype of the arrays, and + the exactness of the comparison (or tolerance when comparing floats). + Parameters ---------- left, right : ExtensionArray @@ -726,6 +730,12 @@ def assert_extension_array_equal( .. versionadded:: 2.0.0 + See Also + -------- + testing.assert_series_equal : Check that left and right ``Series`` are equal. + testing.assert_frame_equal : Check that left and right ``DataFrame`` are equal. + testing.assert_index_equal : Check that left and right ``Index`` are equal. + Notes ----- Missing values are checked separately from valid values.