Skip to content

Commit fa9831f

Browse files
committed
fix(pandas): ensure that empty arrays unnest to nothing
1 parent 28c2498 commit fa9831f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ibis/backends/pandas/execution/arrays.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def execute_array_collect_groupby(op, data, where, aggcontext=None, **kwargs):
147147

148148
@execute_node.register(ops.Unnest, pd.Series)
149149
def execute_unnest(op, data, **kwargs):
150-
return data.explode()
150+
return data[data.map(lambda v: bool(len(v)), na_action="ignore")].explode()
151151

152152

153153
@execute_node.register(ops.ArrayFlatten, pd.Series)

0 commit comments

Comments
 (0)