Skip to content

Commit

Permalink
Refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Nov 1, 2023
1 parent 8ce08d1 commit 6296f4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/core/groupby/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,9 @@ def result_index_and_ids(self) -> tuple[Index, np.ndarray]:

codes = [e[0] for e in codes_and_uniques]
levels = [e[1] for e in codes_and_uniques]
# TODO: Modify in Grouping.groups instead?
for k, (ping, level) in enumerate(zip(self.groupings, levels)):
if ping._passed_categorical:
# TODO: Modify in Grouping.groups instead?
# set_categories is dynamically added
levels[k] = level.set_categories( # type: ignore[union-attr]
ping._orig_cats
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/groupby/aggregate/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def test_agg_timezone_round_trip():


def test_sum_uint64_overflow():
# see gh-14758
# Convert to uint64 and don't overflow
# GH#14758
# Don't coerce object to more specific dtype
df = DataFrame([[1, 2], [3, 4], [5, 6]], dtype=object)
df = df + 9223372036854775807

Expand Down

0 comments on commit 6296f4a

Please sign in to comment.