MCPcopy Create free account
hub / github.com/datasweet/datatable / Append

Method Append

mutate_row.go:14–31  ·  view source on GitHub ↗

Append rows to the table

(row ...Row)

Source from the content-addressed store, hash-verified

12
13// Append rows to the table
14func (t *DataTable) Append(row ...Row) {
15 for _, r := range row {
16 if r == nil {
17 continue
18 }
19 for _, col := range t.cols {
20 if !col.IsComputed() {
21 if cell, ok := r[col.Name()]; ok {
22 col.serie.Append(cell)
23 continue
24 }
25 }
26 col.serie.Grow(1)
27 }
28 t.nrows++
29 }
30 t.dirty = true
31}
32
33// AppendRow creates a new row and append cells to this row
34func (t *DataTable) AppendRow(v ...interface{}) error {

Callers

nothing calls this directly

Calls 4

IsComputedMethod · 0.65
NameMethod · 0.65
AppendMethod · 0.65
GrowMethod · 0.65

Tested by

no test coverage detected