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

Method ColumnIndex

table.go:77–84  ·  view source on GitHub ↗

ColumnIndex gets the index of the column with name returns -1 if not found

(name string)

Source from the content-addressed store, hash-verified

75// ColumnIndex gets the index of the column with name
76// returns -1 if not found
77func (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.

Callers 3

SwapColumnMethod · 0.95
SortMethod · 0.95
ConcatMethod · 0.80

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected