Skip to content

Commit

Permalink
- fixes pandas backend for groupby on column containing null values: …
Browse files Browse the repository at this point in the history
…for consistency with other backends (duck, postgres), NULL should be included in output groups
  • Loading branch information
jc-5s committed Jul 5, 2024
1 parent 6a748c4 commit 67e3d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/pandas/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def visit(cls, op: ops.DropColumns, parent, columns_to_drop):
@classmethod
def visit(cls, op: PandasAggregate, parent, groups, metrics):
if groups:
parent = parent.groupby([col.name for col in groups.values()])
parent = parent.groupby([col.name for col in groups.values()], dropna=False)
metrics = {k: parent.apply(v) for k, v in metrics.items()}
result = cls.concat(metrics, axis=1).reset_index()
renames = {v.name: k for k, v in op.groups.items()}
Expand Down

0 comments on commit 67e3d34

Please sign in to comment.