Skip to content

Commit 3737164

Browse files
committed
47734: updates for infer string tests
1 parent c93e69a commit 3737164

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/computation/ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from pandas.core.dtypes.common import (
2020
is_list_like,
2121
is_scalar,
22+
pandas_dtype,
2223
)
2324

2425
import pandas.core.common as com
@@ -238,7 +239,7 @@ def return_type(self):
238239
@property
239240
def has_invalid_return_type(self) -> bool:
240241
types = self.operand_types
241-
obj_dtype_set = frozenset([np.dtype("object"), str])
242+
obj_dtype_set = frozenset([np.dtype("object"), str, pandas_dtype("string")])
242243
return self.return_type == object and types - obj_dtype_set
243244

244245
@property

0 commit comments

Comments
 (0)