Skip to content

Commit

Permalink
Rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bennet committed Feb 10, 2023
1 parent dfc4c4b commit 9834276
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dask/dataframe/groupby.py
Expand Up @@ -1539,15 +1539,15 @@ def _single_agg(
if aggregate_kwargs is None:
aggregate_kwargs = {}

if "columns" in chunk_kwargs:
columns = chunk_kwargs.pop("columns")
else:
columns = meta.name if is_series_like(meta) else meta.columns

if meta is None:
with check_numeric_only_deprecation():
meta = func(self._meta_nonempty, **chunk_kwargs)

if "columns" not in chunk_kwargs:
chunk_kwargs["columns"] = (
meta.name if is_series_like(meta) else meta.columns
)

args = [self.obj] + (self.by if isinstance(self.by, list) else [self.by])

token = self._token_prefix + token
Expand All @@ -1559,6 +1559,7 @@ def _single_agg(
chunk=_apply_chunk,
chunk_kwargs={
"chunk": func,
"columns": columns,
**self.observed,
**self.dropna,
**chunk_kwargs,
Expand All @@ -1583,6 +1584,7 @@ def _single_agg(
chunk=_apply_chunk,
chunk_kwargs=dict(
chunk=func,
columns=columns,
**self.observed,
**chunk_kwargs,
**self.dropna,
Expand Down

0 comments on commit 9834276

Please sign in to comment.