defassert_frame_not_equal(df1, df2, **kwargs):#assert_frame_equalexists, but we need the ability to assert that frames are not equaltry:assert_frame_equal(df1, df2, **kwargs)raiseAssertionError('DataFrames are equal.')exceptAssertionError:pass 开发者ID:Geekly,项目名称:pybcm,代码行数:7,...
# 需要导入模块: from pandas import testing [as 别名]# 或者: from pandas.testing importassert_frame_equal[as 别名]defis_same_as(df, df_to_compare, **kwargs):"""Asserts that two pd.DataFrames are equal. Args: df (pd.DataFrame): Any pd.DataFrame. df_to_compare (pd.DataFrame): A s...
edit by @TomAugspurger The check_names docstring for pandas.util.testing.assert_frame_equal is unclear: check_names : bool, default True Whether to check the Index names attribute. This should clarify that both the index and columns name...