Skip to content

Commit 5f8477f

Browse files
committed
Don't check isinstance
1 parent e88c392 commit 5f8477f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def maybe_cast_result(
278278
if is_extension_array_dtype(dtype) and dtype.kind != "M":
279279
# The result may be of any type, cast back to original
280280
# type if it's compatible.
281-
if len(result) and isinstance(result[0], dtype.type):
281+
if len(result):
282282
cls = dtype.construct_array_type()
283283
result = maybe_cast_to_extension_array(cls, result, dtype=dtype)
284284

0 commit comments

Comments
 (0)