File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -339,12 +339,8 @@ def __internal_pivot_table(
339
339
if values_passed :
340
340
# GH#57876 and GH#61292
341
341
# Explicitly aggregate ``values``.
342
+ # mypy is not aware `grouped[values]` will always be a DataFrameGroupBy
342
343
grouped = grouped [values ] # type: ignore[assignment]
343
- # TODO: ``grouped`` will have type ``DataFrameGroupBy`` because
344
- # ``values`` is guaranteed to be a ``list[Any]`` per above
345
- # logic. The type hints for ``DataFrameGroupBy`` require an
346
- # overload for mypy to determine this. See stubs in pandas-stubs.
347
- # https://github.com/pandas-dev/pandas-stubs/blob/8434bde95460b996323cc8c0fea7b0a8bb00ea26/pandas-stubs/core/groupby/generic.pyi#L222
348
344
349
345
agged = grouped .agg (aggfunc , ** kwargs )
350
346
You can’t perform that action at this time.
0 commit comments