ColumnIndex gets the index of the column with name returns -1 if not found
(name string)
| 75 | // ColumnIndex gets the index of the column with name |
| 76 | // returns -1 if not found |
| 77 | func (t *DataTable) ColumnIndex(name string) int { |
| 78 | for i, col := range t.cols { |
| 79 | if col.Name() == name { |
| 80 | return i |
| 81 | } |
| 82 | } |
| 83 | return -1 |
| 84 | } |
| 85 | |
| 86 | // Records returns the rows in datatable as string |
| 87 | // Computes all expressions. |
no test coverage detected