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

BUG: DataFrame's behavior of boolean operators doesn't match pandas #6029

Open
3 tasks done
dchigarev opened this issue Apr 21, 2023 · 0 comments
Open
3 tasks done

BUG: DataFrame's behavior of boolean operators doesn't match pandas #6029

dchigarev opened this issue Apr 21, 2023 · 0 comments
Assignees
Labels
bug 🦗 Something isn't working P2 Minor bugs or low-priority feature requests pandas concordance 🐼 Functionality that does not match pandas

Comments

@dchigarev
Copy link
Collaborator

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

from modin.pandas.test.utils import create_test_dfs

md_df1, pd_df1 = create_test_dfs({"a": [1, 2], "b": [3, 4]})
md_df2, pd_df2 = create_test_dfs({"b": [5, 2], "c": [6, 7]})

print(f"modin.eq:\n{md_df1.eq(md_df2)}")
print(f"pandas.eq:\n{pd_df1.eq(pd_df2)}")
# both print the following:
# modin/pandas.eq:
#        a      b      c
# 0  False  False  False
# 1  False  False  False

print(f"modin.__eq__:\n{md_df1 == md_df2}") # the same result as for `.eq`
print(f"pandas.__eq__:\n{pd_df1 == pd_df2}") # ValueError: dataframes has to be identically labeled

Issue Description

It seems that pandas have different logic for public and private boolean binary methods, while modin goes through the same method in both cases (query_compiler.eq).

Expected Behavior

We should match pandas here

Error Logs

Replace this line with the error backtrace (if applicable).

Installed Versions

Replace this line with the output of pd.show_versions()

@dchigarev dchigarev added bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas P2 Minor bugs or low-priority feature requests labels Apr 21, 2023
@dchigarev dchigarev self-assigned this Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P2 Minor bugs or low-priority feature requests pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

No branches or pull requests

1 participant