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

df_equals do not assert frame missmatches in some cases #2249

Closed
dchigarev opened this issue Oct 15, 2020 · 2 comments · Fixed by #2250
Closed

df_equals do not assert frame missmatches in some cases #2249

dchigarev opened this issue Oct 15, 2020 · 2 comments · Fixed by #2250
Assignees
Labels
bug 🦗 Something isn't working P0 Highest priority tasks requiring immediate fix
Milestone

Comments

@dchigarev
Copy link
Collaborator

Sometimes df_equals just returns False when frame aren't equals and not asserting it

if isinstance(df1, pandas.DataFrame) and isinstance(df2, pandas.DataFrame):
if (df1.empty and not df2.empty) or (df2.empty and not df1.empty):
return False
elif df1.empty and df2.empty and type(df1) != type(df2):
return False

@dchigarev dchigarev added the bug 🦗 Something isn't working label Oct 15, 2020
@dchigarev dchigarev self-assigned this Oct 15, 2020
@dchigarev dchigarev added this to the 0.8.2 milestone Oct 15, 2020
@dchigarev dchigarev added the P0 Highest priority tasks requiring immediate fix label Oct 15, 2020
dchigarev added a commit to dchigarev/modin that referenced this issue Oct 15, 2020
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
dchigarev added a commit to dchigarev/modin that referenced this issue Oct 15, 2020
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
@YarShev
Copy link
Collaborator

YarShev commented Oct 15, 2020

Also, I think we need to use the functions in the public pandas API to compare dataframes via df_equals.

from modin.pandas.test.utils import df_equals
FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.

dchigarev added a commit to dchigarev/modin that referenced this issue Oct 15, 2020
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
@dchigarev
Copy link
Collaborator Author

@YarShev good point! I've filled it in an issue #2260

dchigarev added a commit to dchigarev/modin that referenced this issue Oct 15, 2020
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
anmyachev pushed a commit that referenced this issue Oct 16, 2020
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P0 Highest priority tasks requiring immediate fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants