Versions in this module Expand all Collapse all v0 v0.3.2 Apr 11, 2022 Changes in this version + var ErrAddingColumn = errors.New("could not add column with given type") + var ErrCantAddColumn = errors.New("can't add column") + var ErrCantReadHeaders = errors.New("can't read headers") + var ErrColumnAlreadyExists = errors.New("column already exists") + var ErrColumnNotFound = errors.New("column not found") + var ErrCreateSerie = errors.New("create serie") + var ErrEmptyName = errors.New("empty name") + var ErrEvaluateExprSizeMismatch = errors.New("size mismatch") + var ErrFormulaeSyntax = errors.New("formulae syntax") + var ErrLengthMismatch = errors.New("length mismatch") + var ErrNilColumn = errors.New("nil column") + var ErrNilColumnName = errors.New("nil column name") + var ErrNilColumnType = errors.New("nil column type") + var ErrNilDatas = errors.New("nil datas") + var ErrNilDatatable = errors.New("nil datatable") + var ErrNilFactory = errors.New("nil factory") + var ErrNilOutputDatatable = errors.New("nil output datatable") + var ErrNilSerie = errors.New("nil serie") + var ErrNilTable = errors.New("table is nil") + var ErrNoGroupBy = errors.New("no groupby") + var ErrNoGroups = errors.New("no groups") + var ErrNoOnClauses = errors.New("no on clauses") + var ErrNoOutput = errors.New("no output") + var ErrNoTables = errors.New("no tables") + var ErrNotEnoughDatatables = errors.New("not enough datatables") + var ErrOnClauseIsNil = errors.New("on clause is nil") + var ErrOpenFile = errors.New("open file") + var ErrReadingLine = errors.New("could not read line") + var ErrTypeAlreadyExists = errors.New("type already exists") + var ErrUnknownAgg = errors.New("unknown agg") + var ErrUnknownColumnType = errors.New("unknown column type") + var ErrUnknownMode = errors.New("unknown mode") + var ErrUpdateRow = errors.New("update row") + var ErrWrongNumberOfTypes = errors.New("expected different number of types") + func RegisterColumnType(name ColumnType, serier ColumnSerier) error + type AggregateBy struct + As string + Field string + Type AggregationType + type AggregationType uint8 + const Avg + const Count + const CountDistinct + const Cusum + const Max + const Median + const Min + const Stddev + const Sum + const Variance + func (a AggregationType) String() string + type Column interface + IsComputed func() bool + IsVisible func() bool + Name func() string + Type func() ColumnType + UnderlyingType func() reflect.Type + type ColumnOption func(opts *ColumnOptions) + func ColumnHidden(v bool) ColumnOption + func Expr(v string) ColumnOption + func TimeFormats(v ...string) ColumnOption + func Values(v ...interface{}) ColumnOption + type ColumnOptions struct + Expr string + Hidden bool + TimeFormats []string + Values []interface{} + type ColumnSerier func(ColumnOptions) serie.Serie + type ColumnType string + const Bool + const Float32 + const Float64 + const Int + const Int32 + const Int64 + const Raw + const String + const Time + func ColumnTypes() []ColumnType + type DataTable struct + func Concat(tables []*DataTable) (*DataTable, error) + func InnerJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) + func LeftJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) + func New(name string) *DataTable + func OuterJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) + func RightJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) + func (dt *DataTable) Aggregate(by ...AggregateBy) (*DataTable, error) + func (dt *DataTable) GroupBy(by ...GroupBy) (*Groups, error) + func (left *DataTable) Concat(table ...*DataTable) (*DataTable, error) + func (left *DataTable) InnerJoin(right *DataTable, on []JoinOn) (*DataTable, error) + func (left *DataTable) LeftJoin(right *DataTable, on []JoinOn) (*DataTable, error) + func (left *DataTable) OuterJoin(right *DataTable, on []JoinOn) (*DataTable, error) + func (left *DataTable) RightJoin(right *DataTable, on []JoinOn) (*DataTable, error) + func (t *DataTable) AddColumn(name string, ctyp ColumnType, opt ...ColumnOption) error + func (t *DataTable) Append(row ...Row) + func (t *DataTable) AppendRow(v ...interface{}) error + func (t *DataTable) Column(name string) Column + func (t *DataTable) ColumnIndex(name string) int + func (t *DataTable) Columns() []string + func (t *DataTable) Copy() *DataTable + func (t *DataTable) EmptyCopy() *DataTable + func (t *DataTable) Grow(size int) + func (t *DataTable) Head(size int) *DataTable + func (t *DataTable) HiddenColumns() []string + func (t *DataTable) HideAll() + func (t *DataTable) HideColumn(name string) + func (t *DataTable) Name() string + func (t *DataTable) NewRow() Row + func (t *DataTable) NumCols() int + func (t *DataTable) NumRows() int + func (t *DataTable) Print(writer io.Writer, opt ...PrintOption) + func (t *DataTable) Records() [][]string + func (t *DataTable) Rename(name string) + func (t *DataTable) RenameColumn(old, name string) error + func (t *DataTable) Row(at int, opt ...ExportOption) Row + func (t *DataTable) Rows(opt ...ExportOption) []Row + func (t *DataTable) ShowAll() + func (t *DataTable) ShowColumn(name string) + func (t *DataTable) Sort(by ...SortBy) *DataTable + func (t *DataTable) String() string + func (t *DataTable) Subset(at, size int) *DataTable + func (t *DataTable) SwapColumn(a, b string) error + func (t *DataTable) SwapRow(i, j int) + func (t *DataTable) Tail(size int) *DataTable + func (t *DataTable) ToMap(opt ...ExportOption) []map[string]interface{} + func (t *DataTable) ToSchema(opt ...ExportOption) *Schema + func (t *DataTable) ToTable(opt ...ExportOption) [][]interface{} + func (t *DataTable) Update(at int, row Row) error + func (t *DataTable) Where(predicate func(row Row) bool) *DataTable + type ExportOption func(*ExportOptions) + func ExportHidden(v bool) ExportOption + type ExportOptions struct + WithHiddenCols bool + type GroupBy struct + Keyer func(row Row) (interface{}, bool) + Name string + Type ColumnType + type Groups struct + func (g *Groups) Aggregate(aggs ...AggregateBy) (*DataTable, error) + type JoinOn struct + Field string + Table string + func On(fields ...string) []JoinOn + func Using(fields ...string) []JoinOn + type PrintOption func(opts *PrintOptions) + func PrintColumnName(v bool) PrintOption + func PrintColumnType(v bool) PrintOption + func PrintMaxRows(v int) PrintOption + func PrintRowNumber(v bool) PrintOption + type PrintOptions struct + ColumnName bool + ColumnType bool + MaxRows int + RowNumber bool + type Row map[string]interface + func (r Row) Get(k string) interface{} + func (r Row) Hash() uint64 + func (r Row) Set(k string, v interface{}) Row + type Schema struct + Columns []SchemaColumn + Name string + Rows [][]interface{} + type SchemaColumn struct + Name string + Type string + type SortBy struct + Column string + Desc bool