I have two pandas data frames in which I store money amounts, i.e. decimal numbers with at most 15 significant decimal digits. Since float64 has a precision of 15 significant decimal digits, this should be lossless.
How do I compare the values of two such dataframes for equivalence up to the 15 significant decimal digits?
In short, I am looking for something like numpy.testing.assert_approx_equal - which should however take numpy arrays as arguments rather than only scalars.
Another option would be to use a rounding function that can round to a given number of significant decimal digits rather than the usual decimal places.
there's actually a numpy function for this:
definition/usage: