set column names
 @param [Array] column names or headings
191351
def columns=(array)
      @_header_adjustment = 1
      @columns = array
      @columns.each_with_index { |c,i| 
        @cw[i] ||= c.to_s.length
        @calign[i] ||= :left
      }
      # maintains index in current pointer and gives next or prev
      @column_pointer = Circular.new @columns.size()-1
    end
1078541
public function setColumns(array $columns)
    {
        // add columns
        foreach($columns['add'] as $key => $value) {
            $this->dataTables->addColumn($key, $value);
        }

        // edit columns
        foreach($columns['edit'] as $key => $value) {
            $this->dataTables->editColumn($key, $value);
        }

        // remove columns
        foreach($columns['remove'] as $value) {
            $this->dataTables->removeColumn($value);
        }
    }
695615
public void setColumns(final Integer cols) {
		if (cols != null && cols < 0) {
			throw new IllegalArgumentException("Must have zero or more columns");
		}
		Integer currColumns = getColumns();
		if (!Objects.equals(cols, currColumns)) {
			getOrCreateComponentModel().cols = cols;
		}
	}
451957
function setColumns($columns) {
		$this->columns = array();

		if ($columns === null) {
			return $this;
		}

		if (is_string($columns)) {
			return $this->addColumn($columns);
		}

		foreach ($columns as $alias => &$column) {
			$this->addColumn($column, is_int($alias) ? null : $alias);
		}
		return $this;
	}
70944
def set_col_first(df, col_names):
        

        column_headings = df.columns
        column_headings = column_headings.tolist()
        try:
            for col_name in col_names:
                i = column_headings.index(col_name)
                column_headings.pop(column_headings.index(col_name))
                column_headings.insert(0, col_name)

        finally:
            df = df.reindex(columns=column_headings)
            return df
684203
def set_primary_key(self, columns, index_name=False):
        
        self._add_index(
            self._create_index(columns, index_name or "primary", True, True)
        )

        for column_name in columns:
            column = self.get_column(column_name)
            column.set_notnull(True)

        return self
1047967
def AddTableColumns(self, table, columns):
    """"""
    table_columns = self._table_columns.setdefault(table, [])
    for attr in columns:
      if attr not in table_columns:
        table_columns.append(attr)
363031
def build_columns(header)
      columns = header.each_with_index.map do |header_column, index|
        convert_column(header_column, index).tap do |column|
          maybe_raise_missing_column!(column)
        end
      end

      @deduplicator.call(columns)
    end
181362
def columns
      # we want to delay initializing to the @core.columns set for as long as possible. Too soon and .search_sql will not be available to .searchable?
      unless defined? @columns
        self.columns = @core.columns.collect { |c| c.name if @core.columns._inheritable.include?(c.name) && c.searchable? && c.association.nil? && c.text? }.compact
      end
      @columns
    end
392814
public function setModifiedColumns(array $modifiedColumns)
    {
        $this->modifiedColumns = [];
        foreach ($modifiedColumns as $columnName => $modifiedColumn) {
            $this->addModifiedColumn($columnName, $modifiedColumn);
        }
    }
1200334
public function setColumns(array $columns)
    {
        $this->mappingColumns = null;
        $this->columns = array_values($columns);

        return $this;
    }
778698
def setCols(self, columns):
        
        self._raster[1] = columns
        if self._raster[0] == 0:
            self._raster[0] = 1
1024291
def add_column(name, column_properties = {})
      validate_column_absence(name)
      create_column_properties(name, column_properties)
      @data_rows.each{|x|
        x << (yield Row.new(@column_indexes, x))
      }
      @column_indexes[name] = @column_indexes.size
      self # enable chaining
    end
1276306
def set_cols_width(self, array):
        

        self._check_row_size(array)
        try:
            array = map(int, array)
            if reduce(min, array) <= 0:
                raise ValueError
        except ValueError:
            sys.stderr.write("Wrong argument in column width specification\n")
            raise
        self._width = array
592243
public function setColumns(array $indexColumns)
    {
        $this->indexColumns = array();
        $this->indexColumnSizes = array();
        foreach ($indexColumns as $col) {
            $this->addColumn($col);
        }
    }
1160478
def [](name)
      key = name.to_s
      if attributes.key?(key)
        attributes[key]
      elsif index = underscored_column_names.index(key)
        attributes[@columns[index].name]
      end
    end
967380
def setColumns( self, columns ):
        
        self.setColumnCount(len(columns))
        self.setHorizontalHeaderLabels(columns)