Versions in this module Expand all Collapse all v0 v0.1.4 Jun 1, 2024 v0.1.3 May 5, 2024 v0.1.2 May 1, 2024 v0.1.1 May 1, 2024 Changes in this version + const AddAggName + const Ascending + const ColumnNameOnly + const Contains + const Descending + const Equals + const Headers + const IgnoreCase + const NoHeaders + const UseCase + var TableHeaderToType = map[byte]reflect.Kind + func AddColumn[T string | bool | float32 | float64 | int | int32 | byte](dt *Table, name string) tensor.Tensor + func AddTensorColumn[T string | bool | float32 | float64 | int | int32 | byte](dt *Table, name string, cellSizes []int, dimNames ...string) tensor.Tensor + func ConfigFromDataValues(dt *Table, hdrs []string, rec [][]string) error + func ConfigFromHeaders(dt *Table, hdrs []string, rec [][]string) error + func ConfigFromTableHeaders(dt *Table, hdrs []string) error + func DetectTableHeaders(hdrs []string) bool + func InferDataType(str string) reflect.Kind + func ShapeFromString(dims string) []int + func TableColumnType(nm string) (reflect.Kind, string) + func TableHeaderChar(typ reflect.Kind) byte + func UpdateSliceTable(st any, dt *Table) + type Delims int32 + const Comma + const DelimsN + const Detect + const Space + const Tab + func DelimsValues() []Delims + func (dl Delims) Rune() rune + func (i *Delims) SetInt64(in int64) + func (i *Delims) SetString(s string) error + func (i *Delims) UnmarshalText(text []byte) error + func (i Delims) Desc() string + func (i Delims) Int64() int64 + func (i Delims) MarshalText() ([]byte, error) + func (i Delims) String() string + func (i Delims) Values() []enums.Enum + type FilterFunc func(et *Table, row int) bool + type IndexView struct + Indexes []int + Table *Table + func NewIndexView(et *Table) *IndexView + func (ix *IndexView) AddIndex(idx int) + func (ix *IndexView) AddRows(n int) + func (ix *IndexView) Clone() *IndexView + func (ix *IndexView) CopyFrom(oix *IndexView) + func (ix *IndexView) DeleteInvalid() + func (ix *IndexView) DeleteRows(at, n int) + func (ix *IndexView) Filter(filterFunc func(et *Table, row int) bool) + func (ix *IndexView) FilterColumn(colIndex int, str string, exclude, contains, ignoreCase bool) + func (ix *IndexView) FilterColumnName(column string, str string, exclude, contains, ignoreCase bool) error + func (ix *IndexView) InsertRows(at, n int) + func (ix *IndexView) Len() int + func (ix *IndexView) Less(i, j int) bool + func (ix *IndexView) NewTable() *Table + func (ix *IndexView) OpenCSV(filename core.Filename, delim Delims) error + func (ix *IndexView) OpenFS(fsys fs.FS, filename string, delim Delims) error + func (ix *IndexView) Permuted() + func (ix *IndexView) RowsByString(column string, str string, contains, ignoreCase bool) []int + func (ix *IndexView) RowsByStringIndex(colIndex int, str string, contains, ignoreCase bool) []int + func (ix *IndexView) RowsByStringTry(column string, str string, contains, ignoreCase bool) ([]int, error) + func (ix *IndexView) SaveCSV(filename core.Filename, delim Delims, headers bool) error + func (ix *IndexView) Sequential() + func (ix *IndexView) SetTable(et *Table) + func (ix *IndexView) Sort(lessFunc func(et *Table, i, j int) bool) + func (ix *IndexView) SortColumn(colIndex int, ascending bool) + func (ix *IndexView) SortColumnName(column string, ascending bool) error + func (ix *IndexView) SortColumnNames(columns []string, ascending bool) error + func (ix *IndexView) SortColumns(colIndexes []int, ascending bool) + func (ix *IndexView) SortIndexes() + func (ix *IndexView) SortStable(lessFunc func(et *Table, i, j int) bool) + func (ix *IndexView) SortStableColumn(colIndex int, ascending bool) + func (ix *IndexView) SortStableColumnName(column string, ascending bool) error + func (ix *IndexView) SortStableColumnNames(columns []string, ascending bool) error + func (ix *IndexView) SortStableColumns(colIndexes []int, ascending bool) + func (ix *IndexView) Swap(i, j int) + func (ix *IndexView) WriteCSV(w io.Writer, delim Delims, headers bool) error + type LessFunc func(et *Table, i, j int) bool + type SplitAgg struct + Aggs [][]float64 + ColumnIndex int + Name string + func (sa *SplitAgg) Clone() *SplitAgg + func (sa *SplitAgg) CopyFrom(osa *SplitAgg) + type Splits struct + Aggs []*SplitAgg + Levels []string + Splits []*IndexView + Values [][]string + func (spl *Splits) AddAgg(name string, colIndex int) *SplitAgg + func (spl *Splits) AggByColumnName(name string) *SplitAgg + func (spl *Splits) AggByColumnNameTry(name string) (*SplitAgg, error) + func (spl *Splits) AggByName(name string) *SplitAgg + func (spl *Splits) AggByNameTry(name string) (*SplitAgg, error) + func (spl *Splits) AggsToTable(colName bool) *Table + func (spl *Splits) AggsToTableCopy(colName bool) *Table + func (spl *Splits) ByValue(values []string) []int + func (spl *Splits) Clone() *Splits + func (spl *Splits) CopyFrom(osp *Splits) + func (spl *Splits) Delete(idx int) + func (spl *Splits) DeleteAggs() + func (spl *Splits) ExtractLevels(levels []int) (*Splits, error) + func (spl *Splits) Filter(fun func(idx int) bool) + func (spl *Splits) Len() int + func (spl *Splits) Less(i, j int) bool + func (spl *Splits) New(dt *Table, values []string, rows ...int) *IndexView + func (spl *Splits) ReorderLevels(order []int) error + func (spl *Splits) SetLevels(levels ...string) + func (spl *Splits) Sort(lessFunc func(spl *Splits, i, j int) bool) + func (spl *Splits) SortLevels() + func (spl *Splits) SortOrder(order []int) error + func (spl *Splits) Swap(i, j int) + func (spl *Splits) Table() *Table + type SplitsLessFunc func(spl *Splits, i, j int) bool + type Table struct + ColumnNameMap map[string]int + ColumnNames []string + Columns []tensor.Tensor + MetaData map[string]string + Rows int + func NewSliceTable(st any) (*Table, error) + func NewTable(rows int, name ...string) *Table + func (dt *Table) AddColumn(tsr tensor.Tensor, name string) error + func (dt *Table) AddColumnOfType(typ reflect.Kind, name string) tensor.Tensor + func (dt *Table) AddFloat32Column(name string) tensor.Tensor + func (dt *Table) AddFloat32TensorColumn(name string, cellSizes []int, dimNames ...string) tensor.Tensor + func (dt *Table) AddFloat64Column(name string) tensor.Tensor + func (dt *Table) AddFloat64TensorColumn(name string, cellSizes []int, dimNames ...string) tensor.Tensor + func (dt *Table) AddIntColumn(name string) tensor.Tensor + func (dt *Table) AddIntTensorColumn(name string, cellSizes []int, dimNames ...string) tensor.Tensor + func (dt *Table) AddRows(n int) + func (dt *Table) AddStringColumn(name string) tensor.Tensor + func (dt *Table) AddTensorColumnOfType(typ reflect.Kind, name string, cellSizes []int, dimNames ...string) tensor.Tensor + func (dt *Table) AppendRows(dt2 *Table) + func (dt *Table) Clone() *Table + func (dt *Table) Column(i int) tensor.Tensor + func (dt *Table) ColumnByName(name string) tensor.Tensor + func (dt *Table) ColumnByNameTry(name string) (tensor.Tensor, error) + func (dt *Table) ColumnIndex(name string) int + func (dt *Table) ColumnIndexTry(name string) (int, error) + func (dt *Table) ColumnIndexesByNames(names []string) []int + func (dt *Table) ColumnName(i int) string + func (dt *Table) CopyCell(column string, row int, cpt *Table, cpColNm string, cpRow int) bool + func (dt *Table) CopyMetaDataFrom(cp *Table) + func (dt *Table) DeleteAll() + func (dt *Table) DeleteColumnIndex(idx int) + func (dt *Table) DeleteColumnName(name string) error + func (dt *Table) Float(column string, row int) float64 + func (dt *Table) FloatIndex(column, row int) float64 + func (dt *Table) IsValidRow(row int) bool + func (dt *Table) NumColumns() int + func (dt *Table) NumRows() int + func (dt *Table) OpenCSV(filename core.Filename, delim Delims) error + func (dt *Table) OpenFS(fsys fs.FS, filename string, delim Delims) error + func (dt *Table) ReadCSV(r io.Reader, delim Delims) error + func (dt *Table) ReadCSVRow(rec []string, row int) + func (dt *Table) RowsByString(column string, str string, contains, ignoreCase bool) []int + func (dt *Table) RowsByStringIndex(column int, str string, contains, ignoreCase bool) []int + func (dt *Table) SaveCSV(filename core.Filename, delim Delims, headers bool) error + func (dt *Table) SetFloat(column string, row int, val float64) bool + func (dt *Table) SetFloatIndex(column, row int, val float64) bool + func (dt *Table) SetMetaData(key, val string) + func (dt *Table) SetNumRows(rows int) + func (dt *Table) SetString(column string, row int, val string) bool + func (dt *Table) SetStringIndex(column, row int, val string) bool + func (dt *Table) SetTensor(column string, row int, val tensor.Tensor) bool + func (dt *Table) SetTensorFloat1D(column string, row int, idx int, val float64) bool + func (dt *Table) SetTensorIndex(column, row int, val tensor.Tensor) bool + func (dt *Table) StringIndex(column, row int) string + func (dt *Table) StringValue(column string, row int) string + func (dt *Table) TableHeaders() []string + func (dt *Table) Tensor(column string, row int) tensor.Tensor + func (dt *Table) TensorFloat1D(column string, row int, idx int) float64 + func (dt *Table) TensorIndex(column, row int) tensor.Tensor + func (dt *Table) UpdateColumnNameMap() error + func (dt *Table) WriteCSV(w io.Writer, delim Delims, headers bool) error + func (dt *Table) WriteCSVHeaders(w io.Writer, delim Delims) (int, error) + func (dt *Table) WriteCSVRow(w io.Writer, row int, delim Delims) error + func (dt *Table) WriteCSVRowWriter(cw *csv.Writer, row int, ncol int) error