Skip to content

Commit

Permalink
PERF-#6727: Remove remaining 'result.name = None' in groupby code
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Nov 8, 2023
1 parent bb94bbe commit cb044b4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions modin/pandas/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit cb044b4

Please sign in to comment.