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

Method StringIndex

tensor/table/table.go:475–484  ·  view source on GitHub ↗

StringIndex returns the string value of cell at given column, row index for columns that have 1-dimensional tensors. Returns "" if column is not a 1-dimensional tensor or row not valid.

(column, row int)

Source from the content-addressed store, hash-verified

473// for columns that have 1-dimensional tensors.
474// Returns "" if column is not a 1-dimensional tensor or row not valid.
475func (dt *Table) StringIndex(column, row int) string {
476 if !dt.IsValidRow(row) {
477 return ""
478 }
479 ct := dt.Columns[column]
480 if ct.NumDims() != 1 {
481 return ""
482 }
483 return ct.String1D(row)
484}
485
486// NOTE: String conflicts with [fmt.Stringer], so we have to use StringValue
487

Callers 1

MakeRowMethod · 0.80

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 3

IsValidRowMethod · 0.95
NumDimsMethod · 0.65
String1DMethod · 0.65

Tested by

no test coverage detected