Skip to content

Commit a1fee91

Browse files
BryanCutlerWillAyd
authored andcommitted
fix docstring examples for assert_frame_equal (#26004)
1 parent 181f972 commit a1fee91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/util/testing.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1170,18 +1170,21 @@ def assert_frame_equal(left, right, check_dtype=True,
11701170
>>> df2 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]})
11711171
11721172
df1 equals itself.
1173+
11731174
>>> assert_frame_equal(df1, df1)
11741175
11751176
df1 differs from df2 as column 'b' is of a different type.
1177+
11761178
>>> assert_frame_equal(df1, df2)
11771179
Traceback (most recent call last):
11781180
AssertionError: Attributes are different
1179-
1181+
...
11801182
Attribute "dtype" are different
11811183
[left]: int64
11821184
[right]: float64
11831185
11841186
Ignore differing dtypes in columns with check_dtype.
1187+
11851188
>>> assert_frame_equal(df1, df2, check_dtype=False)
11861189
"""
11871190
__tracebackhide__ = True

0 commit comments

Comments
 (0)