You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regardless of exactly emulating object dtype, we should maybe ask ourselves the more general question: how does pandas handle equality comparisons of incompatible dtypes in general? (or at least with the non-arrow dtypes)
At the moment, it seems we just never raise an error, with one exception for comparing two categoricals (based on a quick experiment, didn't include every possible dtype):
Exception for category and category
Exception for category and category
So if we want to keep that "rule" consistent, then I think the new default string dtype should also never raise in comparisons, but give Falses instead.
in general we follow python semantics for non-comparable dtypes: == returns all-False, != returns all-True, and inequalities raise. A boilerplate version of this logic is in ops.invalid_comparison
Uh oh!
There was an error while loading. Please reload this page.
Reproducible Example
Issue Description
This shouldn't raise if we want to emulate object dtype behavior
Expected Behavior
all False return value
cc @jorisvandenbossche thoughts?
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: