Skip to content

Commit 7e4f873

Browse files
fixup the json test ea
1 parent d793899 commit 7e4f873

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/extension/json/array.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ def _cast_pointwise_result(self, values):
9797
try:
9898
return type(self)._from_sequence(values, dtype=self.dtype)
9999
except (ValueError, TypeError):
100-
return values
100+
# TODO replace with public function
101+
from pandas._libs import lib
102+
103+
values = np.asarray(values, dtype=object)
104+
return lib.maybe_convert_objects(values, convert_non_numeric=True)
101105

102106
def __getitem__(self, item):
103107
if isinstance(item, tuple):

0 commit comments

Comments
 (0)