Skip to content

Commit 76029fb

Browse files
committed
changes in series.py
1 parent cd15bda commit 76029fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/series.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,9 +2586,12 @@ def combine(self, other, func, fill_value=None):
25862586
if is_categorical_dtype(self.values):
25872587
pass
25882588
elif is_extension_array_dtype(self.values):
2589-
# The function can return something of any type, so check
2590-
# if the type is compatible with the calling EA.
2591-
new_values = try_cast_to_ea(self._values, new_values)
2589+
if len(new_values)>0:
2590+
if not is_bool(new_values[0]):
2591+
# The function can return something of any type, so check
2592+
# if the type is compatible with the calling EA.
2593+
new_values = try_cast_to_ea(self._values, new_values)
2594+
25922595
return self._constructor(new_values, index=new_index, name=new_name)
25932596

25942597
def combine_first(self, other):

0 commit comments

Comments
 (0)