diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index d6c5935ecf685..a381a7bcb33f5 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -177,9 +177,6 @@ def pinner(cls): class SeriesGroupBy(GroupBy[Series]): _apply_allowlist = base.series_apply_allowlist - # Defined as a cache_readonly in SelectionMixin - _obj_with_exclusions: Series - def _iterate_slices(self) -> Iterable[Series]: yield self._selected_obj @@ -930,9 +927,6 @@ def pct_change(self, periods=1, fill_method="pad", limit=None, freq=None): @pin_allowlisted_properties(DataFrame, base.dataframe_apply_allowlist) class DataFrameGroupBy(GroupBy[DataFrame]): - # Defined as a cache_readonly in SelectionMixin - _obj_with_exclusions: DataFrame - _apply_allowlist = base.dataframe_apply_allowlist _agg_examples_doc = dedent(