def _is_grouped_by_sliced_column(self, df, index):
        if isinstance(df, DataFrame) and isinstance(index, Series):
            if (index.name is not None and
                index._name == df._name + '.' + index.name):
                return True
        return False
Return whether index is a Series sliced from df
dataset/ETHPy150Open dask/dask/dask/dataframe/groupby.py/_GroupBy._is_grouped_by_sliced_column