Returns a table with the same columns as this table
173401
public Table copy() {
        Table copy = new Table(name);
        for (Column<?> column : columnList) {
            copy.addColumns(column.emptyCopy(rowCount()));
        }

        int[] rows = new int[rowCount()];
        for (int i = 0; i < rowCount(); i++) {
            rows[i] = i;
        }
        Rows.copyRowsToTable(rows, this, copy);
        return copy;
    }
199991
def values(self):
        
        return [getattr(self, c.name, None) for c in self.__table__._columns]
1232043
def get_database_columns(self, tables=None, database=None):
        """"""
        # Get table data and columns from source database
        source = database if database else self.database
        tables = tables if tables else self.tables
        return {tbl: self.get_columns(tbl) for tbl in tqdm(tables, total=len(tables),
                                                           desc='Getting {0} columns'.format(source))}
241309
def specifiedColumns(self):
        
        columns = []
        table = self.tableType()
        tree = self.treePopupWidget()
        schema = table.schema()
        
        if self._specifiedColumns is not None:
            colnames = self._specifiedColumns
        else:
            colnames = tree.columns()
        
        for colname in colnames:
            if isinstance(colname, Column):
                columns.append(colname)
            else:
                col = schema.column(colname)
                if col and not col.isProxy():
                    columns.append(col)
        
        return columns
633676
protected function getTableColumns()
    {
        if (0 === count(self::$tableColumns)) {
            $table = $this->getTable();
            $connect = $this->getConnection();
            $builder = $connect->getSchemaBuilder();
            $columns = $builder->getColumnListing($table);

            self::$tableColumns = (array)$columns;
        }
        return self::$tableColumns;
    }
446639
def <<(row)
      cells = if row_mapper
                row_mapper.map(row)
              else
                row
              end

      if @columns.nil? || @columns.empty?
        @columns = Tabular::Columns.new(self, cells, column_mapper)
        return columns unless cells.respond_to?(:keys)
      end

      new_row = Tabular::Row.new(self, cells, row)
      new_row.each_key do |key|
        columns << key
      end
      rows << new_row
      new_row
    end
1092848
def get_primary_key_columns(self):
        
        if not self.has_primary_key():
            raise DBALException('Table "%s" has no primary key.' % self.get_name())

        return self.get_primary_key().get_columns()
473931
def columns(table_name, name = nil)#:nodoc:
      result = show_fields_from(table_name, name)

      columns = []
      result.each do |field|
        klass = \
          if field[1] =~ GEOMETRY_REGEXP
            ActiveRecord::ConnectionAdapters::SpatialMysqlColumn
          else
            ActiveRecord::ConnectionAdapters::MysqlColumn
          end
        columns << klass.new(field[0], field[4], field[1], field[2] == "YES")
      end

      result.free
      columns
    end
484305
def table(self):
        """"""
        dimensions = max_dimensions(self.table_data, self.padding_left, self.padding_right)[:3]
        return flatten(self.gen_table(*dimensions))
1308140
def columns(self):
        
        c = self._connection.cursor()
        c.execute("describe `%s`.`%s`" % (self._db, self._name))
        self._cols = []
        for col in c.fetchall():
            self._cols.append(Column.build(col, table=self, con=self._connection))
        return self._cols
1287121
function() {
      var array = [],
          i, j, ilen, jlen;
      for(i = 0, ilen = this.elements.length; i < ilen; i++) {
        var row = [];
        for(j = 0, jlen = this.column_names.length; j < jlen ; j++) {
          row.push( this.elements[i][ this.column_names[j] ] );
        }
        array.push(row);
      }
      return array;
    }
1000707
def columns(self):
        
        schema = self.schema()
        return [schema.column(col) for col in self.__columns]
1168360
def table_from_data(data, column_names):
    ""

    # The agate table is generated from a list of dicts, so the column order
    # from `data` is not preserved. We can use `select` to reorder the columns
    #
    # If there is no data, create an empty table with the specified columns

    if len(data) == 0:
        return agate.Table([], column_names=column_names)
    else:
        table = agate.Table.from_object(data, column_types=DEFAULT_TYPE_TESTER)
        return table.select(column_names)
62057
def getcolslice(self, blc, trc, inc=[], startrow=0, nrow=-1, rowincr=1):
        """"""
        return self._table.getcolslice(self._column, blc, trc, inc, startrow, nrow, rowincr)
129561
def eigen_table(self):
        """"""
        idx = ["Eigenvalue", "Variability (%)", "Cumulative (%)"]
        table = pd.DataFrame(
            np.array(
                [self.eigenvalues, self.inertia, self.cumulative_inertia]
            ),
            columns=["F%s" % i for i in range(1, self.keep + 1)],
            index=idx,
        )

        return table
261815
def table(self, datatype=None):
        ""
        if config.future_deprecations:
            self.param.warning(
                "The table method is deprecated and should no "
                "longer be used. Instead cast the %s to a "
                "a Table directly." % type(self).__name__)

        if datatype and not isinstance(datatype, list):
            datatype = [datatype]
        from ..element import Table
        return Table(self, **(dict(datatype=datatype) if datatype else {}))
31421
def columns(table_name, name = nil)#:nodoc:
      show_fields_from(table_name, name).map do |field|
        klass = \
          if field["Type"] =~ GEOMETRY_REGEXP
            ActiveRecord::ConnectionAdapters::SpatialMysqlColumn
          else
            ActiveRecord::ConnectionAdapters::MysqlColumn
          end
        klass.new(field['Field'], field['Default'], field['Type'], field['Null'] == "YES")
      end
    end