From cb044b4df59020dc5616f3e31b594a848e5a56b7 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Wed, 8 Nov 2023 00:32:05 +0100 Subject: [PATCH] PERF-#6727: Remove remaining 'result.name = None' in groupby code Signed-off-by: Anatoly Myachev --- modin/pandas/groupby.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modin/pandas/groupby.py b/modin/pandas/groupby.py index 61854faaabd..7f6f9193c26 100644 --- a/modin/pandas/groupby.py +++ b/modin/pandas/groupby.py @@ -1092,8 +1092,6 @@ def size(self): ) elif isinstance(self._df, Series): result.name = self._df.name - else: - result.name = None return result def sum(self, numeric_only=False, min_count=0, engine=None, engine_kwargs=None): @@ -1163,8 +1161,6 @@ def ngroup(self, ascending=True): if not isinstance(result, Series): # The result should always be a Series with name None and type int64 result = result.squeeze(axis=1) - # TODO: this might not hold in the future - result.name = None return result def nunique(self, dropna=True): @@ -1311,7 +1307,6 @@ def cumcount(self, ascending=True): if not isinstance(result, Series): # The result should always be a Series with name None and type int64 result = result.squeeze(axis=1) - result.name = None return result def tail(self, n=5):