-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Series.gt (and other comparison methods) can fail with dtype=object #59418
Comments
I would like to work on this |
Thanks for the report - it seems to me comparing |
take |
@rhshadrach - Any ideas for a fix? do we raise an error when "<" is used between Series that contains None? |
That seems like the correct behavior to me - yes. |
Should |
Also, should one expect the behavior to be consistent across all values for which |
My above comments are only regarding Python's |
Thanks. I'll just note that the below also currently runs without error. Not sure if that's a situation that needs to be considered as well.
|
Hi @warwickmm! Are you working on this? If not, I would like to take this up. |
I am not. |
take |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When a
Series
hasdtype=object
, comparison methods (e.g.,.gt
) can raise aTypeError: '>' not supported
error. No error is encountered when using the>
operator, or when callingDataFrame.gt
, or when theSeries
hasdtype=float
.Expected Behavior
When the
Series
hasdtype=object
, the behavior ofSeries.gt
should be consistent with the>
operator and with theDataFrame.gt
method.Installed Versions
The text was updated successfully, but these errors were encountered: