From 1a81c118f6b434e963a89fbcb99ff6e7c2bee7d5 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 24 Feb 2023 22:22:54 -0500 Subject: [PATCH] BUG: Change default of group_keys to True --- pandas/core/frame.py | 2 +- pandas/core/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: