BUG: Bug in .resample() and .groupby() when aggregating on integers
closes #16361

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=h1) Report
> Merging [#16549](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/03d44f3dd0ffd55d7538b67466cf4d3899ceac27?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16549/graphs/tree.svg?token=eZ4WkYLtcO&height=150&src=pr&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16549      +/-   ##
==========================================
+ Coverage   90.75%   90.77%   +0.01%     
==========================================
  Files         161      161              
  Lines       51074    51074              
==========================================
+ Hits        46353    46360       +7     
+ Misses       4721     4714       -7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.6% <100%> (+0.01%)` | :arrow_up: |
| #single | `40.16% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.04% <100%> (ø)` | :arrow_up: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.33% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.94% <0%> (+0.96%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=footer). Last update [03d44f3...60aff01](https://codecov.io/gh/pandas-dev/pandas/pull/16549?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
