-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: comparing multicolumn dataframe with datetime64 values to series gives TypeError #9006
Comments
Although I am not sure this is the correct result:
There are no overlapping elements between the dataframe and series, but why then sometimes True and sometimes False? |
this is quite tricky; datetimes are not handled in a multi-column vectorized way correctly xref to #8554. I think I can fix this but its a bit tricky. |
@jorisvandenbossche I'm not entirely clear on what the issue is here. Is it about broadcasting? Maybe it has been resolved in the interim? |
I think the first case raises a sensible error now (not date parsed)
The 2nd case doesn't seem to raise a sensible error as there is no float column being compared
|
IIUC reindexing is introducing float (all-nan) columns, which then raise on comparison. That automatic reindexing was deprecated in #36795. we could try to get something in for 1.4 to give a better exception message, but i dont think its worth the trouble |
This now correctly raises because automatic alignment deprecation has been enforced. Is there another bug after that surfaces if we manually align before the comparison? |
When trying to compare a dataframe to a column/series (I know, in the following case not useful due to the alignement of the series with the columns of the dataframe and not the rows, but it is something typical users will try), I get the correct results if there are strings in the dataframe and series, but a TypeError when the dataframe contains datetime values:
The text was updated successfully, but these errors were encountered: