Skip to content

DOC: Make usage of rtol and atol arguments in pd.testing.assert_frame_equal clearer #59344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
conorhamill36 opened this issue Jul 29, 2024 · 6 comments · Fixed by #59434
Closed
1 task done
Assignees
Labels
Docs Testing pandas testing functions or related to the test suite

Comments

@conorhamill36
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.testing.assert_frame_equal.html

Documentation problem

When atol and rtol are used, the check of equality between two dataframes is of the form absolute(a - b) <= (atol + rtol * absolute(b)).

It's not clear that atol and rtol are used together like this, resulting in it being unclear what exact is being checked.

Suggested fix for documentation

Expand the explanation of atol and rtol in the documentation, possibly explicitly including the equation that is testing equality.

@conorhamill36 conorhamill36 added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 29, 2024
@OmarAli-Ibrahim
Copy link

assign it to me

@conorhamill36
Copy link
Author

@omaraliii I don't seem to have the cog beside the assignees, does someone with more authorisation in this repo need to do that?

@rhshadrach
Copy link
Member

@omaraliii - I think it would be good to review the contributor documentation. See here:

https://pandas.pydata.org/docs/dev/development/contributing.html#finding-an-issue-to-contribute-to

@rhshadrach rhshadrach added Testing pandas testing functions or related to the test suite and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 3, 2024
@KevsterAmp
Copy link
Contributor

@omaraliii are you still working on this?

@tan-i-ham
Copy link
Contributor

May I take this?

I will add the description near here and maybe add the example if possible

Whether to compare number exactly.

@tan-i-ham
Copy link
Contributor

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants