skbio.util.assert_data_frame_almost_equal(left, right)[source]¶Raise AssertionError if pd.DataFrame objects are not “almost equal”.
State: Experimental as of 0.4.0.
Wrapper of pd.util.testing.assert_frame_equal. Floating point values
are considered “almost equal” if they are within a threshold defined by
assert_frame_equal. This wrapper uses a number of
checks that are turned off by default in assert_frame_equal in order to
perform stricter comparisons (for example, ensuring the index and column
types are the same). It also does not consider empty pd.DataFrame
objects equal if they have a different index.
Other notes:
np.nan) in the same locations are considered equal.This is a helper function intended to be used in unit tests that need to
compare pd.DataFrame objects.
| Parameters: | left, right : pd.DataFrame
|
|---|---|
| Raises: | AssertionError
|
See also
pandas.util.testing.assert_frame_equal