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: Modin's dtypes cache contains invalid value after an unsuccessful cast (when .astype(..., errors="ignore")) #5962

Open
3 tasks done
dchigarev opened this issue Apr 10, 2023 · 0 comments
Labels
bug 🦗 Something isn't working P1 Important tasks that we should complete soon

Comments

@dchigarev
Copy link
Collaborator

dchigarev commented Apr 10, 2023

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({"col1": ["a", 0, 1]})

md_res = md_df1.astype(int, errors="ignore") 
pd_res = pd_df1.astype(int, errors="ignore")

print(f"modin dtypes:\n{md_res.dtypes}\n") # int64 (successful cast?)
print(f"pandas dtypes:\n{pd_res.dtypes}\n") # object (unsuccessful as expected)

print(f"modin's insides:\n{md_res._to_pandas().dtypes}") # object (unsuccessful as expected)

Issue Description

Modin seems to change the dtypes anyway even if the cast was unsuccessful.

Expected Behavior

To work as pandas

Error Logs

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

Installed Versions

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

--
Note: this issue is a part of an epic #3804

@dchigarev dchigarev added bug 🦗 Something isn't working P1 Important tasks that we should complete soon labels Apr 10, 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 P1 Important tasks that we should complete soon
Projects
None yet
Development

No branches or pull requests

1 participant