h2o-py/h2o/group_by.py
def get_frame(self):
        """
        Return the resulting H2OFrame containing the result(s) of aggregation(s) of the group by.

        The number of rows denote the number of groups generated by the group by operation.

        The number of columns depend on the number of aggregations performed, the number of columns specified in
        the col parameter.  Generally, expect the number of columns to be

        (len(col) of aggregation 0 + len(col) of aggregation 1 +...+ len(col) of aggregation n) x
        (number of groups of the GroupBy object) +1 (for group-by group names).

        Note:
            - the count aggregation only generates one column;
            - if col is a str or int, len(col) = 1.
        """
        if self._res is None:
            aggs = []
            cols_operated = []
            for k in self._aggs:
                aggs += (self._aggs[k])
                col_used = self._aggs[k][1]
                if col_used not in cols_operated:
                    cols_operated.append(col_used)

            for cind in cols_operated:
                if cind not in self._by:
                    self._check_string_columns(cind)
            self._res = h2o.H2OFrame._expr(expr=ExprNode("GB", self._fr, self._by, *aggs))

        return self._res
def get_frame(self):
        """
        Return the resulting H2OFrame containing the result(s) of aggregation(s) of the group by.

        The number of rows denote the number of groups generated by the group by operation.

        The number of columns depend on the number of aggregations performed, the number of columns specified in
        the col parameter.  Generally, expect the number of columns to be

        (len(col) of aggregation 0 + len(col) of aggregation 1 +...+ len(col) of aggregation n) x
        (number of groups of the GroupBy object) +1 (for group-by group names).

        Note:
            - the count aggregation only generates one column;
            - if col is a str or int, len(col) = 1.
        """
        if self._res is None:
            aggs = []
            cols_operated = []
            for k in self._aggs:
                aggs += (self._aggs[k])
                col_used = self._aggs[k][1]
                if col_used not in cols_operated:
                    cols_operated.append(col_used)

            for cind in cols_operated:
                if cind not in self._by:
                    self._check_string_columns(cind)
            self._res = h2o.H2OFrame._expr(expr=ExprNode("GB", self._fr, self._by, *aggs))

        return self._res
def get_frame ( self ) : if self . _res is None : aggs = [ ] cols_operated = [ ] for k in self . _aggs : aggs += ( self . _aggs [ k ] ) col_used = self . _aggs [ k ] [ 1 ] if col_used not in cols_operated : cols_operated . append ( col_used ) for cind in cols_operated : if cind not in self . _by : self . _check_string_columns ( cind ) self . _res = h2o . H2OFrame . _expr ( expr = ExprNode ( "GB" , self . _fr , self . _by , * aggs ) ) return self . _res
Return the resulting H2OFrame containing the result(s) of aggregation(s) of the group by.

        The number of rows denote the number of groups generated by the group by operation.

        The number of columns depend on the number of aggregations performed, the number of columns specified in
        the col parameter.  Generally, expect the number of columns to be

        (len(col) of aggregation 0 + len(col) of aggregation 1 +...+ len(col) of aggregation n) x
        (number of groups of the GroupBy object) +1 (for group-by group names).

        Note:
            - the count aggregation only generates one column;
            - if col is a str or int, len(col) = 1.
Return the resulting H2OFrame containing the result ( s ) of aggregation ( s ) of the group by .