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

assert_frame_equal's error is too verbose #18883

Open
Light2Dark opened this issue Sep 24, 2024 · 0 comments
Open

assert_frame_equal's error is too verbose #18883

Light2Dark opened this issue Sep 24, 2024 · 0 comments
Labels
enhancement New feature or an improvement of an existing feature

Comments

@Light2Dark
Copy link

Description

I work with large datasets (100k rows), and when I test dataframes using assert_frame_equal, I find that the error message is overly verbose and does not show me where the error is. This is because the error message printed will print out both dataframes in whole.

import polars as pl
from polars.testing import assert_frame_equal
from copy import deepcopy

a = list(range(0,1000,2))
b = deepcopy(a)

a[0] = 4
b[-1] = 2000

df_a = pl.LazyFrame({
    "a": a
})

df_b = pl.LazyFrame({
    "a": b
})

assert_frame_equal(df_a, df_b)

Maybe we can limit the number of rows printed in the error message / ideally incorporate compare functionality from #14373.

@Light2Dark Light2Dark added the enhancement New feature or an improvement of an existing feature label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant