MCPcopy Create free account
hub / github.com/cogentcore/core / AppendRows

Method AppendRows

tensor/table/table.go:341–356  ·  view source on GitHub ↗

AppendRows appends shared columns in both tables with input table rows

(dt2 *Table)

Source from the content-addressed store, hash-verified

339
340// AppendRows appends shared columns in both tables with input table rows
341func (dt *Table) AppendRows(dt2 *Table) {
342 shared := false
343 strow := dt.Rows
344 for iCol := range dt.Columns {
345 colName := dt.ColumnName(iCol)
346 if dt2.ColumnIndex(colName) != -1 {
347 if !shared {
348 shared = true
349 dt.AddRows(dt2.Rows)
350 }
351 for iRow := 0; iRow < dt2.Rows; iRow++ {
352 dt.CopyCell(colName, iRow+strow, dt2, colName, iRow)
353 }
354 }
355 }
356}
357
358// SetMetaData sets given meta-data key to given value, safely creating the
359// map if not yet initialized. Standard Keys are:

Callers 1

TestAppendRowsFunction · 0.80

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

ColumnNameMethod · 0.95
AddRowsMethod · 0.95
CopyCellMethod · 0.95
ColumnIndexMethod · 0.80

Tested by 1

TestAppendRowsFunction · 0.64