pandas.testing.assert_extension_array_equal

pandas.testing.assert_extension_array_equal(left, right, check_dtype=True, check_less_precise=False, check_exact=False)[source]

Check that left and right ExtensionArrays are equal.

Parameters
left, rightExtensionArray

The two arrays to compare

check_dtypebool, default True

Whether to check if the ExtensionArray dtypes are identical.

check_less_precisebool or int, default False

Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare.

check_exactbool, default False

Whether to compare number exactly.

Notes

Missing values are checked separately from valid values. A mask of missing values is computed for each and checked to match. The remaining all-valid values are cast to object dtype and checked.