From 32191bb175bab0c8e0eb5a6fcf87fb7e6a3ff523 Mon Sep 17 00:00:00 2001 From: Darcy Meyer Date: Tue, 6 Feb 2018 12:44:23 -0500 Subject: [PATCH] DOC: Clarify check_names in assert_frame_equal Explicitly state that the `names` attribute of `DataFrame.index` and `DataFrame.columns` are being compared. Closes gh-19411. --- pandas/util/testing.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 09f5e59535adf..e54269d525957 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -1304,7 +1304,12 @@ def assert_frame_equal(left, right, check_dtype=True, 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare check_names : bool, default True - Whether to check the Index names attribute. + Whether to check that the `names` attribute for both the `index` + and `column` attributes of the DataFrame is identical, i.e. + + * left.index.names == right.index.names + * left.columns.names == right.columns.names + by_blocks : bool, default False Specify how to compare internal data. If False, compare by columns. If True, compare by blocks.