AppendRows appends shared columns in both tables with input table rows
(dt2 *Table)
| 339 | |
| 340 | // AppendRows appends shared columns in both tables with input table rows |
| 341 | func (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: |