Keep columns of this record and remove other columns.
@param columns the column names of the record
483319
public Record keep(String... columns) {
		if (columns != null && columns.length > 0) {
			Map<String, Object> newColumns = new HashMap<String, Object>(columns.length);	// getConfig().containerFactory.getColumnsMap();
			for (String c : columns)
				if (this.getColumns().containsKey(c))	// prevent put null value to the newColumns
					newColumns.put(c, this.getColumns().get(c));
			
			this.getColumns().clear();
			this.getColumns().putAll(newColumns);
		}
		else
			this.getColumns().clear();
		return this;
	}
615895
public void shuffleColumnValues(ArrayList<String> columns) throws Exception {
		doubleValues.clear();
		ArrayList<String> rows = this.getDataRows();
		for (String column : columns) { //shuffle all values in the column
			ArrayList<Integer> rowIndex = new ArrayList<Integer>();
			for (int i = 0; i < rows.size(); i++) {
				rowIndex.add(i);
			}
			Collections.shuffle(rowIndex);
			for (int i = 0; i < rows.size(); i++) {
				String row = rows.get(i);
				int randomIndex = rowIndex.get(i);
				String destinationRow = rows.get(randomIndex);


				String temp = this.getCell(destinationRow, column);
				String value = this.getCell(row, column);
				this.addCell(destinationRow, column, value);
				this.addCell(row, column, temp);
			}
		}

	}
785815
public void setColumn(int column, double[] values) {
        checkIndices(values.length - 1, column);

        values[column] = values[column];
    }
507100
public void setSkewedColumnValues(java.util.Collection<String> skewedColumnValues) {
        if (skewedColumnValues == null) {
            this.skewedColumnValues = null;
            return;
        }

        this.skewedColumnValues = new java.util.ArrayList<String>(skewedColumnValues);
    }
670444
def _remove_column(self, name):
        
        self._columns = filter(lambda c: c.name != name, self._columns)

        return self
449030
public function handleShowAllColumns()
	{
		$this->deleteSessionData('_grid_hidden_columns');
		$this->saveSessionData('_grid_hidden_columns_manipulated', true);

		$this->redrawControl();

		$this->onRedraw();
	}
1030060
public Columns addAll(Columns columns) {
        for (Column column : columns) {
            this.columns.add(column);
        }
        return this;
    }
1150942
public SelectBuilder columns(String... columns) {
    for (String column : columns) {
      column(column, null);
    }

    return this;
  }
953619
def removeColumns(self, columnNames):
        
        model = self.tableView.model()

        if model is not None:
            model.removeDataFrameColumns(columnNames)

        self.removeColumnButton.setChecked(False)
405735
public function setAddedColumns(array $columns)
    {
        $this->addedColumns = [];
        foreach ($columns as $column) {
            $this->addAddedColumn($column->getName(), $column);
        }
    }
12405
public void deleteColumn(int column) throws BadElementException {
        float newWidths[] = new float[--columns];
        System.arraycopy(widths, 0, newWidths, 0, column);
        System.arraycopy(widths, column + 1, newWidths, column, columns - column);
        setWidths(newWidths);
        System.arraycopy(widths, 0, newWidths, 0, columns);
        widths = newWidths;
        Row row;
        int size = rows.size();
        for (int i = 0; i < size; i++) {
            row = (Row) rows.get(i);
            row.deleteColumn(column);
            rows.set(i, row);
        }
        if (column == columns) {
            curPosition.setLocation(curPosition.x+1, 0);
        }
    }
372657
public void setColumnMetadata(java.util.Collection<ColumnMetadata> columnMetadata) {
        if (columnMetadata == null) {
            this.columnMetadata = null;
            return;
        }

        this.columnMetadata = new java.util.ArrayList<ColumnMetadata>(columnMetadata);
    }
459851
public function removeColumns(array $columns)
    {
        $columnsMap = array_flip($columns);

        $this->removeColumnsInLine($this->headers, $columnsMap);
        $this->removeColumnsInLine($this->aggregations, $columnsMap);
        $this->removeColumnsInLine($this->dataFormats, $columnsMap);
        $this->removeColumnsInLine($this->aggregationsFormats, $columnsMap);

        foreach ($this->data as &$line) {
            $this->removeColumnsInLine($line, $columnsMap);
        }

        return $this;
    }
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        return $this;
    }
659737
def _key_on_columns(key_on, columns):
        
        if key_on is not None:
            if key_on in columns:
                columns.remove(key_on)
            columns = [key_on] + columns
        return columns
395669
public static List<Column> toColumn(List<String> columns) {
        List<Column> ret = new ArrayList<>();
        for (String s : columns)
            ret.add(col(s));
        return ret;
    }
162707
public void dropXColumns(Set<Object> columnSet) {
        columnSet.retainAll(data.xDataTypes.keySet()); //keep only those columns that are already known to the Meta data of the Dataframe

        if(columnSet.isEmpty()) {
            return;
        }

        //remove all the columns from the Meta data
        data.xDataTypes.keySet().removeAll(columnSet);

        streamExecutor.forEach(StreamMethods.stream(entries(), true), e -> {
            Integer rId = e.getKey();
            Record r = e.getValue();

            AssociativeArray xData = r.getX().copy();
            boolean modified = xData.keySet().removeAll(columnSet);

            if(modified) {
                Record newR = new Record(xData, r.getY(), r.getYPredicted(), r.getYPredictedProbabilities());

                //safe to call in this context. we already updated the meta when we modified the xDataTypes
                _unsafe_set(rId, newR);
            }
        });

    }