You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docstring for assert_frame_equals examples is not formatted correctly.
The example section of the docstring for pandas.util.testing.assert_frame_equal is not formatted correctly and causes them to be displayed wrong. There needs to be some added newlines to separate the code blocks.
This example shows comparing two DataFrames that are equal but with columns of differing dtypes.
>>> from pandas.util.testing import assert_frame_equal
>>> df1 = pd.DataFrame({'a': [1, 2], 'b': [3, 4]})
>>> df2 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]})
df1 equals itself. >>> assert_frame_equal(df1, df1)
df1 differs from df2 as column ‘b’ is of a different type. >>> assert_frame_equal(df1, df2) Traceback (most recent call last): AssertionError: Attributes are different
Attribute “dtype” are different [left]: int64 [right]: float64
Ignore differing dtypes in columns with check_dtype. >>> assert_frame_equal(df1, df2, check_dtype=False)
Problem description
The docstring for assert_frame_equals examples is not formatted correctly.
The example section of the docstring for
pandas.util.testing.assert_frame_equal
is not formatted correctly and causes them to be displayed wrong. There needs to be some added newlines to separate the code blocks.see https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.testing.assert_frame_equal.html#pandas-testing-assert-frame-equal
The text was updated successfully, but these errors were encountered: