Skip to content

Commit a040940

Browse files
committed
fix strings
1 parent 0a3135c commit a040940

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/strings.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,9 @@ def _wrap_result_expand(self, result, expand=False):
10901090
else:
10911091
index = self.series.index
10921092
if expand:
1093-
cons_row = self.series._constructor
10941093
cons = self.series._constructor_expanddim
1095-
data = [cons_row(x) for x in result]
1096-
return cons(data, index=index)
1094+
data = [x if (x is not np.nan) else [None] for x in result]
1095+
return cons(data, index=index).fillna(np.nan)
10971096
else:
10981097
name = getattr(result, 'name', None)
10991098
cons = self.series._constructor

0 commit comments

Comments
 (0)