This will return a new table with cell linked with their columns
        that have <Link> in the name
        :return:
322496
def _html_link_cells(self):
        
        new_table = self.copy()
        for row in new_table:
            for c in new_table.columns:
                link = '%s <Link>' % c
                if row.get(link, None):
                    row[c] = '<a href="%s">%s</a>' % (row[link], row[c])

        new_table.columns = [c for c in self.columns if '<Link>' not in c]
        return new_table
566626
def td(name, options = {}, &block)
      column_class = options.delete(:using) || Column
      @columns << column_class.new(name, options, &block)
    end
863029
def _get_select_columns(self, columns=None):
        
        if columns == ["*"] or columns is None:
            columns = ["%s.*" % self._related.get_table()]

        return columns + ["%s.%s" % (self._parent.get_table(), self._first_key)]
1357502
def _cells(self):
        
        col_count = self._column_count
        cells = []
        for tc in self._tbl.iter_tcs():
            for grid_span_idx in range(tc.grid_span):
                if tc.vMerge == ST_Merge.CONTINUE:
                    cells.append(cells[-col_count])
                elif grid_span_idx > 0:
                    cells.append(cells[-1])
                else:
                    cells.append(_Cell(tc, self))
        return cells
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
1052287
def column(m, linkpart):
    '''
    
    '''
    assert linkpart in (0, 1, 2, 3)
    seen = set()
    for link in m.match():
        val = link[linkpart]
        if val not in seen:
            seen.add(val)
            yield val
850483
def structure(table_toplevels):
    

    table_toplevels = tuple(table_toplevels)
    obj = NamedDict()

    last_array_of_tables = None         # The Name of the last array-of-tables header

    for toplevel in table_toplevels:

        if isinstance(toplevel, toplevels.AnonymousTable):
            obj[''] = toplevel.table_element

        elif isinstance(toplevel, toplevels.Table):
            if last_array_of_tables and toplevel.name.is_prefixed_with(last_array_of_tables):
                seq = obj[last_array_of_tables]
                unprefixed_name = toplevel.name.without_prefix(last_array_of_tables)

                seq[-1] = CascadeDict(seq[-1], NamedDict({unprefixed_name: toplevel.table_element}))
            else:
                obj[toplevel.name] = toplevel.table_element
        else:    # It's an ArrayOfTables

            if last_array_of_tables and toplevel.name != last_array_of_tables and \
                    toplevel.name.is_prefixed_with(last_array_of_tables):

                seq = obj[last_array_of_tables]
                unprefixed_name = toplevel.name.without_prefix(last_array_of_tables)

                if unprefixed_name in seq[-1]:
                    seq[-1][unprefixed_name].append(toplevel.table_element)
                else:
                    cascaded_with = NamedDict({unprefixed_name: [toplevel.table_element]})
                    seq[-1] = CascadeDict(seq[-1], cascaded_with)

            else:
                obj.append(toplevel.name, toplevel.table_element)
                last_array_of_tables = toplevel.name

    return obj
447581
function getColumnWithNameOrId(nameOrId, columns) {
  for (var i = 0; i < columns.length; i++) {
    if (columns[i].name === nameOrId || columns[i].id === nameOrId) {
      return columns[i];
    }
  }
}
42226
def table(*columns, &_block)
      rows = []
      yield(rows)

      @io << tag(:table, class: 'rla-report-table', cellspacing: 0) do |content|
        if table_has_header?(columns)
          content << tag(:tr) do
            columns.map { |col| tag(:th, col[:title]) }.join("\n")
          end
        end

        odd = false
        rows.each do |row|
          odd = !odd
          content << tag(:tr) do
            if odd
              row.map { |cell| tag(:td, cell, class: 'alt') }.join("\n")
            else
              row.map { |cell| tag(:td, cell) }.join("\n")
            end
          end
        end
      end
    end
657597
def columns(*names)
      names.map!(&:to_s)
      DataTable.new(map { |h| names.map { |n| [n, h[n]] }.to_h })
    end
1334837
def new_tbl(cls, rows, cols, width):
        
        return parse_xml(cls._tbl_xml(rows, cols, width))
1126416
def columns(self):
        """"""
        res = [col['name'] for col in self.column_definitions]
        res.extend([col['name'] for col in self.foreign_key_definitions])
        return res
823779
def getColumnsByName(elem, name):
	
	name = StripColumnName(name)
	return elem.getElements(lambda e: (e.tagName == ligolw.Column.tagName) and (e.Name == name))
989702
def add_table(self, rows, cols, width):
        
        from .table import Table
        tbl = CT_Tbl.new_tbl(rows, cols, width)
        self._element._insert_tbl(tbl)
        return Table(tbl, self)
820693
function getCellsAtColumn(
    opts: Options,
    // The table
    table: Block,
    columnIndex: number
): List<Block> {
    return table.nodes.map(row => row.nodes.get(columnIndex));
}
964776
def getcellslice(self, rownr, blc, trc, inc=[]):
        """"""
        return self._table.getcellslice(self._column, rownr, blc, trc, inc)
1294689
def new_table(self, name, add_id=True, **kwargs):
        '''
        '''
        from . import Table
        from .exc import NotFoundError

        try:
            table = self.table(name)
            extant = True
        except NotFoundError:

            extant = False

            if 'sequence_id' not in kwargs:
                kwargs['sequence_id'] = self._database.next_sequence_id(Dataset, self.vid, Table)

            table = Table(name=name, d_vid=self.vid, **kwargs)

            table.update_id()

        # Update possibly extant data
        table.data = dict(
            (list(table.data.items()) if table.data else []) + list(kwargs.get('data', {}).items()))

        for key, value in list(kwargs.items()):

            if not key:
                continue
            if key[0] != '_' and key not in ['vid', 'id', 'id_', 'd_id', 'name', 'sequence_id', 'table', 'column', 'data']:
                setattr(table, key, value)

        if add_id:
            table.add_id_column()

        if not extant:
            self.tables.append(table)

        return table