diff --git a/narwhals/_pandas_like/group_by.py b/narwhals/_pandas_like/group_by.py index 4b7c24438..39c4979d7 100644 --- a/narwhals/_pandas_like/group_by.py +++ b/narwhals/_pandas_like/group_by.py @@ -157,7 +157,7 @@ def func(df: Any) -> Any: if parse_version(pd.__version__) < parse_version("2.2.0"): # pragma: no cover result_complex = grouped.apply(func) - else: # pragma: no cover + else: result_complex = grouped.apply(func, include_groups=False) else: # pragma: no cover result_complex = grouped.apply(func)