1>>> from pandas._testing import assert_frame_equal
2>>> df1 = pd.DataFrame({'a': [1, 2], 'b': [3, 4]})
3>>> df2 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]})
4>>> df3 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]})
5>>> assert_frame_equal(df1, df2)
6False
7>>> assert_frame_equal(df2, df3)
8True
9>>> assert_frame_equal(df1, df2, check_dtype=False)
10True
11
1>>> df = pd.DataFrame({1: [10], 2: [20]})
2
3>>> exactly_equal = pd.DataFrame({1: [10], 2: [20]}) # Note the same as above
4
5>>> df.equals(exactly_equal)
6True
7# Two are the same hence true. If not would be false