Skip to content

Commit 47a19af

Browse files
Use is_extension_array_dtype(mapped.dtype) instead of isinstance
1 parent dd616d3 commit 47a19af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3690,7 +3690,7 @@ def f(x):
36903690
from pandas.core.frame import DataFrame
36913691
# GH 25959 we don't need to call tolist
36923692
# if we've been given an ExtensionArray
3693-
if not isinstance(mapped, ExtensionArray):
3693+
if not is_extension_array_dtype(mapped.dtype):
36943694
mapped = mapped.tolist()
36953695
return DataFrame(mapped, index=self.index)
36963696
else:

0 commit comments

Comments
 (0)