Open TEARFEAR opened 9 hours ago
Updated comparison_op function in pandas/core/ops/array_ops.py:
comparison_op
pandas/core/ops/array_ops.py
string
object
Added a test case to validate the fix:
pd.options.future.infer_string = True
[x] closes #60228 (Replace xxxx with the GitHub issue number)
[x] Tests added and passed if fixing a bug or adding a new feature
[x] All code checks passed.
[x] Added type annotations to new arguments/methods/functions.
[x] Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
doc/source/whatsnew/vX.X.X.rst
Changes :
Updated
comparison_op
function inpandas/core/ops/array_ops.py
:string
andobject
dtypes.string
andobject
types are casted to a common type (string
) before comparison.Added a test case to validate the fix:
string
vsobject
with homogeneous and mixed types.pd.options.future.infer_string = True
).[x] closes #60228 (Replace xxxx with the GitHub issue number)
[x] Tests added and passed if fixing a bug or adding a new feature
[x] All code checks passed.
[x] Added type annotations to new arguments/methods/functions.
[x] Added an entry in the latest
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.