Returns the product of each numerical column or row.

        Return:
            A new QueryCompiler object with the product of each numerical column or row.
192
def prod(self, **kwargs):
        
        if self._is_transposed:
            kwargs["axis"] = kwargs.get("axis", 0) ^ 1
            return self.transpose().prod(**kwargs)
        return self._process_sum_prod(
            self._build_mapreduce_func(pandas.DataFrame.prod, **kwargs), **kwargs
        )
319271
def componentCount(self):
        
        return sum([self.columnCountForRow(x) for x in range(self.rowCount())])
1197122
def size(self):
        
        return len(self._query_compiler.index) * len(self._query_compiler.columns)
1276436
def findAllBycolumn(self, target):
        
        column_matches = []
        for column_index in range(self._raster[1]):
            column = self.getRow(column_index)
            column_matches[column_index] = column.findAll(target)
        return column_matches
439547
public static double sumOfProducts(double[]... nums) {
        if (nums == null || nums.length < 1)
            return 0;
        double sum = 0;

        for (int i = 0; i < nums.length; i++) {
            /* The ith column for all of the rows */
            double[] column = column(i, nums);
            sum += times(column);

        }
        return sum;
    }
276537
def _join(self, rows):
    '''
    
    '''
    rval = 0
    for row in rows:
      if row: rval += row
    return rval
213717
def _return_rows(self, table, cols, values, return_type):
        """"""
        if return_type is dict:
            # Pack each row into a dictionary
            cols = self.get_columns(table) if cols is '*' else cols
            if len(values) > 0 and isinstance(values[0], (set, list, tuple)):
                return [dict(zip(cols, row)) for row in values]
            else:
                return dict(zip(cols, values))
        elif return_type is tuple:
            return [tuple(row) for row in values]
        else:
            return values
1024954
def generate(self, where):
        
        if where is None:
            return None

        q = self.table.queryables()
        try:
            return Expr(where, queryables=q, encoding=self.table.encoding)
        except NameError:
            # raise a nice message, suggesting that the user should use
            # data_columns
            raise ValueError(
                "The passed where expression: {0}\n"
                "            contains an invalid variable reference\n"
                "            all of the variable references must be a "
                "reference to\n"
                "            an axis (e.g. 'index' or 'columns'), or a "
                "data_column\n"
                "            The currently defined references are: {1}\n"
                .format(where, ','.join(q.keys()))
            )
458170
def get_query_columns(engine, query):
    
    con = engine.connect()
    result = con.execute(query).fetchone()
    values = list(result)
    cols_names = result.keys()
    cols = OrderedDict()
    for i in range(len(cols_names)):
        cols[cols_names[i]] = type(values[i]).__name__
    return cols
783886
def _convert_query(self, query):
        
        query = self.dictionary.doc2bow(self._tokenize_latex(query))
        sims = self.index[query]
        neighbors = sorted(sims, key=lambda item: -item[1])
        neighbors = {"neighbors":[{self.columns[0]: {"data": self.docs[n[0]], "fmt": "math"}, self.columns[1]: {"data": float(n[1])}} for n in neighbors]} if neighbors else {"neighbors": []}
        return neighbors
516901
def get_value_by_row_col(self, row, col):
        
        if row < 0 or row >= self.nRows or col < 0 or col >= self.nCols:
            raise ValueError("The row or col must be >=0 and less than "
                             "nRows (%d) or nCols (%d)!" % (self.nRows, self.nCols))
        else:
            value = self.data[int(round(row))][int(round(col))]
            if value == self.noDataValue:
                return None
            else:
                return value
376556
def _columns_sql(self, with_namespace=False, **kwargs):
        
        return ' ({columns})'.format(
              columns=','.join(term.get_sql(with_namespace=False, **kwargs)
                               for term in self._columns)
        )
48526
def iter_series(self, workbook, row, col):
        
        for series in self.__series:
            series = dict(series)
            series["values"] = series["values"].get_formula(workbook, row, col)
            if "categories" in series:
                series["categories"] = series["categories"].get_formula(workbook, row, col)
            yield series
1162662
def lists(self, column, key=None):
        
        results = self._query.lists(column, key)

        if self._model.has_get_mutator(column):
            if isinstance(results, dict):
                for key, value in results.items():
                    fill = {column: value}

                    results[key] = self._model.new_from_builder(fill).column
            else:
                for i, value in enumerate(results):
                    fill = {column: value}

                    results[i] = self._model.new_from_builder(fill).column

        return results
414320
def sumcols(msname, col1=None, col2=None, outcol=None, cols=None, suntract=False):
    
    from pyrap.tables import table

    tab = table(msname, readonly=False)
    if cols:
        data = 0
        for col in cols:
            data += tab.getcol(col)
    else:
        if subtract:
            data = tab.getcol(col1) - tab.getcol(col2)
        else:
            data = tab.getcol(col1) + tab.getcol(col2)


    rowchunk = nrows//10 if nrows > 1000 else nrows
    for row0 in range(0, nrows, rowchunk):
        nr = min(rowchunk, nrows-row0)
        tab.putcol(outcol, data[row0:row0+nr], row0, nr)

    tab.close()
972302
def GetColumnNumber (self, columnName):
                """"""
                for row in range(1, self.maxRow + 1):
                        for column in range(1, self.maxColumn + 1):
                                if self.GetCellValue(column, row, "") == columnName:
                                        return column
                return 0
963767
def rowcol(x, y, affine, op=math.floor):
    
    r = int(op((y - affine.f) / affine.e))
    c = int(op((x - affine.c) / affine.a))
    return r, c