Skip to content

Commit

Permalink
fix(pandas): ensure that empty arrays unnest to nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 29, 2023
1 parent 28c2498 commit fa9831f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/pandas/execution/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def execute_array_collect_groupby(op, data, where, aggcontext=None, **kwargs):

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


@execute_node.register(ops.ArrayFlatten, pd.Series)
Expand Down

0 comments on commit fa9831f

Please sign in to comment.