Skip to content

Commit 39ee6d0

Browse files
committed
addressing PR comments
1 parent 9879199 commit 39ee6d0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pandas/core/groupby/generic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,9 +1826,7 @@ def count(self):
18261826

18271827
# If we are grouping on categoricals we want unobserved categories to
18281828
# return zero, rather than the default of NaN which the reindexing in
1829-
# _wrap_agged_blocks() returns. We set self.observed=True for the call to
1830-
# _wrap_agged_blocks() to avoid it reindexing. We then reindex below with
1831-
# fill_value=0. See GH #35028
1829+
# _wrap_agged_blocks() returns. GH 35028
18321830
with com.temp_setattr(self, "observed", True):
18331831
result = self._wrap_agged_blocks(blocks, items=data.items)
18341832

pandas/core/groupby/groupby.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,9 +1537,7 @@ def sum(self, numeric_only: bool = True, min_count: int = 0):
15371537

15381538
# If we are grouping on categoricals we want unobserved categories to
15391539
# return zero, rather than the default of NaN which the reindexing in
1540-
# _agg_general() returns. We set self.observed=True for the call to
1541-
# _agg_general() to avoid it reindexing. We then reindex below with
1542-
# fill_value=0. See GH #31422
1540+
# _agg_general() returns. GH 31422
15431541
with com.temp_setattr(self, "observed", True):
15441542
result = self._agg_general(
15451543
numeric_only=numeric_only,

0 commit comments

Comments
 (0)