diff --git a/pandas/core/frame.py b/pandas/core/frame.py index dd37b94b6428b..05c2348043701 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -8211,7 +8211,7 @@ def groupby( level: IndexLabel | None = None, as_index: bool = True, sort: bool = True, - group_keys: bool | lib.NoDefault = no_default, + group_keys: bool = True, observed: bool = False, dropna: bool = True, ) -> DataFrameGroupBy: diff --git a/pandas/core/series.py b/pandas/core/series.py index badde08c3820d..06e9611c318cd 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1969,7 +1969,7 @@ def groupby( level: IndexLabel = None, as_index: bool = True, sort: bool = True, - group_keys: bool | lib.NoDefault = no_default, + group_keys: bool = True, observed: bool = False, dropna: bool = True, ) -> SeriesGroupBy: