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

Method OpenCSV

tensor/table/io.go:138–142  ·  view source on GitHub ↗

OpenCSV reads a table idx view from a comma-separated-values (CSV) file (where comma = any delimiter, specified in the delim arg), using the Go standard encoding/csv reader conforming to the official CSV standard. If the table does not currently have any columns, the first row of the file is assumed

(filename core.Filename, delim Delims)

Source from the content-addressed store, hash-verified

136// If the table DOES have existing columns, then those are used robustly
137// for whatever information fits from each row of the file.
138func (ix *IndexView) OpenCSV(filename core.Filename, delim Delims) error { //types:add
139 err := ix.Table.OpenCSV(filename, delim)
140 ix.Sequential()
141 return err
142}
143
144// OpenFS is the version of [IndexView.OpenCSV] that uses an [fs.FS] filesystem.
145func (ix *IndexView) OpenFS(fsys fs.FS, filename string, delim Delims) error {

Callers

nothing calls this directly

Calls 2

SequentialMethod · 0.95
OpenCSVMethod · 0.45

Tested by

no test coverage detected