Skip to content
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

Add comparison function for dataframes which can handle both isapprox and isequal column types #3417

Open
schlichtanders opened this issue Jan 15, 2024 · 2 comments
Labels

Comments

@schlichtanders
Copy link

schlichtanders commented Jan 15, 2024

The case is for building tests around DataFrames.jl

(At least) two rather old discourse issue have been opened around this

I couldn't find a satisfying solution despite these discourses are pretty old. Even if the implementation is not going to be inside DataFrames.jl finally, I think it is a good place to start an issue here about it.

EDIT: Here an example for rich comparison, taken from the discourse thread.
example rich comparison output

I would summarize the missing feature as follows:

  • have a @test_compare_dataframes macro or similar which can truly deal with any kind of types (especially those who need isequal for comparison and those who need isapprox). It would be super helpful if such a test macro could have rich output explaining the mismatch in detail if a mismatch occured (similar to DeepDiffs)
  • also make the underlying method available outside the @test-framework for who knows what
@schlichtanders
Copy link
Author

I got a hint that the TestingUtilities package also has a some support for comparing DataFrames. I haven't tested it.

@bkamins
Copy link
Member

bkamins commented Jan 18, 2024

I think that the approach to this should be:

  1. Define the requirements.
  2. Have a reference implementation.
  3. Then decide if it should be shipped with DataFrames.jl or some other package (e.g. it might turn out that proper styling would require extra dependencies, which we might want to avoid)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants