-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame.query raises ValueError when comparing columns with nullable dtypes #31913
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
Comments
I can see the difference between 'df1' and 'df2'. |
What version of pandas do you use? I hope it helps you. |
@zzapzzap I'm using pandas 1.0.1 as shown in the output of |
@daviewales Thanks for the report! |
This is going through numexpr, which generally won't know about pd.NA. We would need to work with the numexpr devs, or more likely avoid passing NA there in the first place. |
the nullable types should force the python engine path as numexpr can’t support anything non numpy based |
Interested to pick this up, should we set Also what is the recommended way to check if dataframe is of nullable type or not, didn't find a right method exposed at dtypes/api.py And if this is right way to proceed, what are the other places in code where this check should happen ? |
take |
I've just run across this issue using pandas 1.2.3. Has there been any development here? |
I've just run across this issue using pandas 1.3.2. |
Code Sample
Problem description
DataFrame.query
raisesValueError: unknown type object
for boolean comparisons when the dtype is one of the new nullable types. (I have tested this for bothInt64
andstring
dtypes.)Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: