Versions in this module Expand all Collapse all v0 v0.60.1 Apr 18, 2025 v0.60.0 Feb 1, 2025 v0.59.0 Jan 5, 2025 v0.58.1 Dec 7, 2024 v0.58.0 Oct 6, 2024 v0.57.0 Sep 3, 2024 v0.56.0 Aug 4, 2024 v0.55.2 Jul 21, 2024 v0.55.1 Jun 19, 2024 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + const DatasetModeColumns + const DatasetModeMatrix + const DatasetModeRows + const DatasetNoMode + const TInteger + const TReal + const TString + const TUndefined + var ErrColIdxOutOfRange = errors.New("tabula: Column index out of range") + var ErrInvalidColType = errors.New("tabula: Invalid column type") + var ErrMisColLength = errors.New("tabula: mismatch on column length") + func RandomPickColumns(dataset DatasetInterface, n int, dup bool, excludeIdx []int) (picked DatasetInterface, unpicked DatasetInterface, pickedIdx []int, ...) + func RandomPickRows(dataset DatasetInterface, n int, duplicate bool) (picked DatasetInterface, unpicked DatasetInterface, pickedIdx []int, ...) + func ReadDatasetConfig(ds interface{}, fcfg string) (e error) + func SortColumnsByIndex(di DatasetInterface, sortedIdx []int) + func SplitRowsByCategorical(di DatasetInterface, colidx int, splitVal []string) (splitIn DatasetInterface, splitEx DatasetInterface, e error) + func SplitRowsByNumeric(di DatasetInterface, colidx int, splitVal float64) (splitLess DatasetInterface, splitGreater DatasetInterface, e error) + func SplitRowsByValue(di DatasetInterface, colidx int, value interface{}) (splitL DatasetInterface, splitR DatasetInterface, e error) + type Claset struct + ClassIndex int + func NewClaset(mode int, types []int, names []string) (claset *Claset) + func (claset *Claset) Clone() interface{} + func (claset *Claset) CountValueSpaces() + func (claset *Claset) Counts() []int + func (claset *Claset) GetClassAsInteger() []int64 + func (claset *Claset) GetClassAsReals() []float64 + func (claset *Claset) GetClassAsStrings() []string + func (claset *Claset) GetClassColumn() *Column + func (claset *Claset) GetClassIndex() int + func (claset *Claset) GetClassRecords() *Records + func (claset *Claset) GetClassType() int + func (claset *Claset) GetClassValueSpace() []string + func (claset *Claset) GetDataset() DatasetInterface + func (claset *Claset) GetMinorityRows() *Rows + func (claset *Claset) IsInSingleClass() (single bool, class string) + func (claset *Claset) MajorityClass() string + func (claset *Claset) MinorityClass() string + func (claset *Claset) RecountMajorMinor() + func (claset *Claset) SetClassIndex(v int) + func (claset *Claset) SetDataset(dataset DatasetInterface) + func (claset *Claset) SetMajorityClass(v string) + func (claset *Claset) SetMinorityClass(v string) + func (claset *Claset) String() (s string) + type ClasetInterface interface + CountValueSpaces func() + Counts func() []int + GetClassAsReals func() []float64 + GetClassAsStrings func() []string + GetClassColumn func() *Column + GetClassIndex func() int + GetClassRecords func() *Records + GetClassType func() int + GetClassValueSpace func() []string + GetMinorityRows func() *Rows + IsInSingleClass func() (bool, string) + MajorityClass func() string + MinorityClass func() string + RecountMajorMinor func() + SetClassIndex func(int) + SetDataset func(DatasetInterface) + SetMajorityClass func(string) + SetMinorityClass func(string) + type Column struct + Flag int + Name string + Records Records + Type int + ValueSpace []string + func NewColumn(colType int, colName string) (col *Column) + func NewColumnInt(data []int64, colName string) (col *Column) + func NewColumnReal(data []float64, colName string) (col *Column) + func NewColumnString(data []string, colType int, colName string) (col *Column, e error) + func (col *Column) ClearValues() + func (col *Column) DeleteRecordAt(i int) *Record + func (col *Column) GetName() string + func (col *Column) GetType() int + func (col *Column) Interface() interface{} + func (col *Column) Len() int + func (col *Column) PushBack(r *Record) + func (col *Column) PushRecords(rs []*Record) + func (col *Column) Reset() + func (col *Column) SetName(name string) + func (col *Column) SetRecords(recs *Records) + func (col *Column) SetType(tipe int) + func (col *Column) SetValueAt(idx int, v string) + func (col *Column) SetValueByNumericAt(idx int, v float64) + func (col *Column) SetValues(values []string) + func (col *Column) ToFloatSlice() (newcol []float64) + func (col *Column) ToIntegers() []int64 + func (col *Column) ToStringSlice() (newcol []string) + type ColumnInterface interface + GetName func() string + GetType func() int + Interface func() interface{} + SetName func(name string) + SetRecords func(recs *Records) + SetType func(tipe int) + type Columns []Column + func (cols *Columns) GetMinMaxLength() (min, max int) + func (cols *Columns) Join(row int, sep, esc []byte) (v []byte) + func (cols *Columns) Len() int + func (cols *Columns) RandomPick(n int, dup bool, excludeIdx []int) (picked Columns, unpicked Columns, pickedIdx []int, unpickedIdx []int) + func (cols *Columns) Reset() + func (cols *Columns) SetTypes(types []int) + type Dataset struct + Columns Columns + Mode int + Rows Rows + func NewDataset(mode int, types []int, names []string) (dataset *Dataset) + func (dataset *Dataset) AddColumn(tipe int, name string, vs []string) + func (dataset *Dataset) Clone() interface{} + func (dataset *Dataset) DeleteRow(i int) (row *Row) + func (dataset *Dataset) FillRowsWithColumn(colIdx int, col Column) + func (dataset *Dataset) GetColumn(idx int) (col *Column) + func (dataset *Dataset) GetColumnByName(name string) (col *Column) + func (dataset *Dataset) GetColumnTypeAt(idx int) (int, error) + func (dataset *Dataset) GetColumns() *Columns + func (dataset *Dataset) GetColumnsName() (names []string) + func (dataset *Dataset) GetColumnsType() (types []int) + func (dataset *Dataset) GetData() interface{} + func (dataset *Dataset) GetDataAsColumns() (columns *Columns) + func (dataset *Dataset) GetDataAsRows() *Rows + func (dataset *Dataset) GetMode() int + func (dataset *Dataset) GetNColumn() (ncol int) + func (dataset *Dataset) GetNRow() (nrow int) + func (dataset *Dataset) GetRow(idx int) *Row + func (dataset *Dataset) GetRows() *Rows + func (dataset *Dataset) Init(mode int, types []int, names []string) + func (dataset *Dataset) Len() int + func (dataset *Dataset) MergeColumns(other DatasetInterface) + func (dataset *Dataset) MergeRows(other DatasetInterface) + func (dataset *Dataset) PushColumn(col Column) + func (dataset *Dataset) PushColumnToRows(col Column) + func (dataset *Dataset) PushRow(row *Row) + func (dataset *Dataset) PushRowToColumns(row *Row) + func (dataset *Dataset) Reset() error + func (dataset *Dataset) SetColumnTypeAt(idx, tipe int) error + func (dataset *Dataset) SetColumns(cols *Columns) + func (dataset *Dataset) SetColumnsName(names []string) + func (dataset *Dataset) SetColumnsType(types []int) + func (dataset *Dataset) SetMode(mode int) + func (dataset *Dataset) SetRows(rows *Rows) + func (dataset *Dataset) TransposeToColumns() + func (dataset *Dataset) TransposeToRows() + type DatasetInterface interface + AddColumn func(tipe int, name string, vs []string) + Clone func() interface{} + DeleteRow func(idx int) *Row + FillRowsWithColumn func(colidx int, col Column) + GetColumn func(idx int) *Column + GetColumnByName func(name string) *Column + GetColumnTypeAt func(idx int) (int, error) + GetColumns func() *Columns + GetColumnsName func() []string + GetColumnsType func() []int + GetData func() interface{} + GetDataAsColumns func() *Columns + GetDataAsRows func() *Rows + GetMode func() int + GetNColumn func() int + GetNRow func() int + GetRow func(idx int) *Row + GetRows func() *Rows + Init func(mode int, types []int, names []string) + Len func() int + MergeColumns func(DatasetInterface) + MergeRows func(DatasetInterface) + PushColumn func(col Column) + PushColumnToRows func(col Column) + PushRow func(r *Row) + PushRowToColumns func(r *Row) + Reset func() error + SetColumnTypeAt func(idx, tipe int) error + SetColumns func(*Columns) + SetColumnsName func(names []string) + SetColumnsType func(types []int) + SetMode func(mode int) + SetRows func(*Rows) + TransposeToColumns func() + TransposeToRows func() + func SelectColumnsByIdx(dataset DatasetInterface, colsIdx []int) (newset DatasetInterface) + func SelectRowsWhere(dataset DatasetInterface, colidx int, colval string) DatasetInterface + type MapRows []MapRowsElement + func (mapRows *MapRows) AddRow(k string, v *Row) + func (mapRows *MapRows) GetMinority() (keyMin string, valMin Rows) + type MapRowsElement struct + Key string + Value Rows + type Matrix struct + Columns *Columns + Rows *Rows + type Record struct + func NewRecord() *Record + func NewRecordBy(v string, t int) (r *Record, e error) + func NewRecordInt(v int64) (r *Record) + func NewRecordReal(v float64) (r *Record) + func NewRecordString(v string) (r *Record) + func (r *Record) Bytes() []byte + func (r *Record) Clone() *Record + func (r *Record) Float() (f64 float64) + func (r *Record) Integer() (i64 int64) + func (r *Record) Interface() interface{} + func (r *Record) IsEqual(o *Record) bool + func (r *Record) IsEqualToInterface(v interface{}) bool + func (r *Record) IsEqualToString(v string) bool + func (r *Record) IsMissingValue() bool + func (r *Record) IsNil() bool + func (r *Record) Reset() + func (r *Record) SetFloat(v float64) + func (r *Record) SetInteger(v int64) + func (r *Record) SetString(v string) + func (r *Record) SetValue(v string, t int) error + func (r *Record) Type() int + func (r Record) String() (s string) + type Records []*Record + func (recs *Records) CountWhere(v interface{}) (c int) + func (recs *Records) CountsWhere(vs []interface{}) (counts []int) + func (recs *Records) Len() int + func (recs *Records) SortByIndex(sortedIdx []int) *Records + type Row []*Record + func (row *Row) Clone() *Row + func (row *Row) GetIntAt(idx int) (int64, bool) + func (row *Row) GetRecord(i int) *Record + func (row *Row) GetValueAt(idx int) (interface{}, bool) + func (row *Row) IsEqual(other *Row) bool + func (row *Row) IsNilAt(idx int) bool + func (row *Row) Len() int + func (row *Row) PushBack(r *Record) + func (row *Row) SetValueAt(idx int, rec *Record) + func (row *Row) Types() (types []int) + type Rows []*Row + func (rows *Rows) Contain(xrow *Row) (bool, int) + func (rows *Rows) Contains(xrows Rows) (isin bool, indices []int) + func (rows *Rows) Del(i int) (row *Row) + func (rows *Rows) GroupByValue(groupIdx int) (mapRows MapRows) + func (rows *Rows) Len() int + func (rows *Rows) PopFront() (row *Row) + func (rows *Rows) PopFrontAsRows() (newRows Rows) + func (rows *Rows) PushBack(r *Row) + func (rows *Rows) RandomPick(n int, duplicate bool) (picked Rows, unpicked Rows, pickedIdx []int, unpickedIdx []int) + func (rows *Rows) SelectWhere(colidx int, colval string) (selected Rows) + func (rows Rows) String() (s string)