def gsum_(self, col: str, index_col: bool=True) -> "Ds":
        """
        Group by and sum column

        :param col: column to group
        :type col: str
        :param index_col: 
        :type index_col: bool
        :return: a dataswim instance
        :rtype: Ds

        :example: ``ds2 = ds.gsum("Col 1")``
        """
        try:
            df = self.df.copy()
            df = df.groupby([col]).sum()
            if index_col is True:
                df[col] = df.index.values
            return self._duplicate_(df)
        except Exception as e:
            self.err(e, self.gsum_, "Can not groupsum column")