Compute the stats for each column provided in columns.
        Parameters
        ----------
        columns : list of str, contains all columns to compute stats on.
546326
def stats(self, columns):
        
        assert (not isinstance(columns, basestring)), "columns should be a " \
                                                      "list of strs,  " \
                                                      "not a str!"
        assert isinstance(columns, list), "columns should be a list!"

        from pyspark.sql import functions as F
        functions = [F.min, F.max, F.avg, F.count]
        aggs = list(
            self._flatmap(lambda column: map(lambda f: f(column), functions),
                          columns))
        return PStats(self.from_schema_rdd(self._schema_rdd.agg(*aggs)))
875213
def new_columns(columns)
      columns.each do |column|
        new_column(column[:type], column[:label], column[:id], column[:role], column[:pattern])
      end
    end
886349
public void setColumns(List<Cell> columns)
    {
        for (Cell column : columns)
        {
            putColumn(CellUtil.cloneFamily(column), CellUtil.cloneQualifier(column), CellUtil.cloneValue(column));
        }
    }
1339967
def Column(self, column_name):
    
    column_idx = None
    for idx, column in enumerate(self.header.columns):
      if column.name == column_name:
        column_idx = idx
        break

    if column_idx is None:
      raise KeyError("Column '{}' not found".format(column_name))

    for row in self.rows:
      yield row.values[column_idx]
53585
def calculate_columns(sequence):
    
    columns = {}

    for row in sequence:
        for key in row.keys():
            if key not in columns:
                columns[key] = len(key)

            value_length = len(str(row[key]))
            if value_length > columns[key]:
                columns[key] = value_length

    return columns
979448
def calc_stats(prices):
    
    if isinstance(prices, pd.Series):
        return PerformanceStats(prices)
    elif isinstance(prices, pd.DataFrame):
        return GroupStats(*[prices[x] for x in prices.columns])
    else:
        raise NotImplementedError('Unsupported type')
110770
def stats(self, ops=(min, max, np.median, sum)):
        """"""
        names = [op.__name__ for op in ops]
        ops = [_zero_on_type_error(op) for op in ops]
        columns = [[op(column) for op in ops] for column in self.columns]
        table = type(self)().with_columns(zip(self.labels, columns))
        stats = table._unused_label('statistic')
        table[stats] = names
        table.move_to_start(stats)
        return table
712567
def columns(self):
        
        return Index(np.array(self._gather_column_names(), dtype=np.bytes_), np.dtype(np.bytes_))
929940
def column_correlations(self, X):
        """"""
        utils.validation.check_is_fitted(self, 's_')

        # Convert numpy array to pandas DataFrame
        if isinstance(X, np.ndarray):
            X = pd.DataFrame(X)

        row_pc = self.row_coordinates(X)

        return pd.DataFrame({
            component: {
                feature: row_pc[component].corr(X[feature])
                for feature in X.columns
            }
            for component in row_pc.columns
        })
19721
def drop_column(self, *columns):
        
        columns = list(columns)

        return self._add_command("drop_column", columns=columns)
625736
def count(self, *columns):
        
        if not columns and self.distinct_:
            columns = self.columns

        if not columns:
            columns = ["*"]

        return int(self.aggregate("count", *columns))
1299870
def expand_counts(df, column, values=None):
    
    d = counts_to_dicts(df, column)
    if len(d) > 0:
        if values is None:
            values = set(np.concatenate(d.apply(lambda c: c.keys()).values))
        for value in values:
            name = values[value] if type(values) is dict else str(value)
            df[column + '_' + name.replace(' ', '_')] =\
                d.apply(lambda c: c[value] if value in c else 0)
    df.drop(column, axis=1, inplace=True)
1224051
def column_cells(self, column_idx):
        
        cells = self._cells
        idxs = range(column_idx, len(cells), self._column_count)
        return [cells[idx] for idx in idxs]
157744
def setColumns(self, columns):
        
        super(XOrbTreeWidget, self).setColumns(columns)
        self.setFilteredColumns(range(len(columns)))
        self.assignOrderNames()
        self._columnsInitialized = True
949179
def _compare_columns(self, new_columns, old_columns):
        
        '''  '''
        
        # print(new_columns)
        # print(old_columns)
        
        add_columns = {}
        remove_columns = {}
        rename_columns = {}
        retype_columns = {}
        resize_columns = {}
        for key, value in new_columns.items():
            if key not in old_columns.keys():
                add_columns[key] = True
                if value[2]:
                    if value[2] in old_columns.keys():
                        rename_columns[key] = value[2]
                        del add_columns[key]
            else:
                if value[1] != old_columns[key][1]:
                    retype_columns[key] = value[1]
                if value[3] != old_columns[key][3]:
                    resize_columns[key] = value[3]
        remove_keys = set(old_columns.keys()) - set(new_columns.keys())
        if remove_keys:
            for key in list(remove_keys):
                remove_columns[key] = True
        
        return add_columns, remove_columns, rename_columns, retype_columns, resize_columns
758181
def _get_stats_column_names(cls):
        
        columns = []
        stats = ('num_bytes', 'num_rows', 'location', 'partitioning_type',
                 'clustering_fields')
        stat_components = ('label', 'value', 'description', 'include')
        for stat_id in stats:
            for stat_component in stat_components:
                columns.append('stats:{}:{}'.format(stat_id, stat_component))
        return tuple(columns)
482065
def local_columns(self):
        
        if self._columns:
            return self._columns
        else:
            self._call_func()
            return self._columns