Skip to content

Commit 3cfb291

Browse files
darcymeyerjreback
authored andcommitted
DOC: Clarify check_names in assert_frame_equal (#19554)
Explicitly state that the `names` attribute of `DataFrame.index` and `DataFrame.columns` are being compared. Closes gh-19411.
1 parent 3273309 commit 3cfb291

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pandas/util/testing.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,12 @@ def assert_frame_equal(left, right, check_dtype=True,
13101310
5 digits (False) or 3 digits (True) after decimal points are compared.
13111311
If int, then specify the digits to compare
13121312
check_names : bool, default True
1313-
Whether to check the Index names attribute.
1313+
Whether to check that the `names` attribute for both the `index`
1314+
and `column` attributes of the DataFrame is identical, i.e.
1315+
1316+
* left.index.names == right.index.names
1317+
* left.columns.names == right.columns.names
1318+
13141319
by_blocks : bool, default False
13151320
Specify how to compare internal data. If False, compare by columns.
13161321
If True, compare by blocks.

0 commit comments

Comments
 (0)