code: def gmean_(self, col: str, index_col: bool=True) -> "Ds":
          
          try:
              df = self.df.copy()
              df = df.groupby([col]).mean()
              if index_col is True:
                  df[col] = df.index.values
              return self._duplicate_(df)
          except Exception as e:
              self.err(e, self.gmean_, "Can not meansum column")
docs: Group by and mean 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.gmean("Col 1")``