Versions in this module Expand all Collapse all v1 v1.0.1 Apr 23, 2025 Changes in this version + const FALSE + const TRUE + var DontLock = dontLock + var ErrNoRows = errors.New("contains no rows") + func Apply(ctx context.Context, sdf interface{}, fn interface{}, opts ...FilterOptions) (interface{}, error) + func B(b bool) int + func BoolValueFormatter(v interface{}) string + func DefaultIsEqualFunc(a, b interface{}) bool + func DefaultValueFormatter(v interface{}) string + func Filter(ctx context.Context, sdf interface{}, fn interface{}, opts ...FilterOptions) (interface{}, error) + func IsValidFloat64(f float64) bool + type ApplyDataFrameFn func(vals map[interface{}]interface{}, row, nRows int) map[interface{}]interface + type ApplySeriesFn func(val interface{}, row, nRows int) interface + type AsciiGraphOptions struct + Caption string + Height int + Offset int + R *Range + Width int + type DataFrame struct + Series []Series + func NewDataFrame(se ...Series) *DataFrame + func (df *DataFrame) AddSeries(s Series, colN *int, opts ...Options) error + func (df *DataFrame) Append(opts *Options, vals ...interface{}) + func (df *DataFrame) ClearRow(row int, opts ...Options) + func (df *DataFrame) Copy(r ...Range) *DataFrame + func (df *DataFrame) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (df *DataFrame) Insert(row int, opts *Options, vals ...interface{}) + func (df *DataFrame) IsEqual(ctx context.Context, df2 *DataFrame, opts ...IsEqualOptions) (bool, error) + func (df *DataFrame) Lock(deepLock ...bool) + func (df *DataFrame) MustNameToColumn(seriesName string, opts ...Options) int + func (df *DataFrame) NRows(opts ...Options) int + func (df *DataFrame) NameToColumn(seriesName string, opts ...Options) (int, error) + func (df *DataFrame) Names(opts ...Options) []string + func (df *DataFrame) Prepend(opts *Options, vals ...interface{}) + func (df *DataFrame) Remove(row int, opts ...Options) + func (df *DataFrame) RemoveSeries(seriesName string, opts ...Options) error + func (df *DataFrame) ReorderColumns(newOrder []string, opts ...Options) error + func (df *DataFrame) Row(row int, dontReadLock bool, retOpt ...SeriesReturnOpt) map[interface{}]interface{} + func (df *DataFrame) Sort(ctx context.Context, keys []SortKey, opts ...SortOptions) (completed bool) + func (df *DataFrame) String() string + func (df *DataFrame) Swap(row1, row2 int, opts ...Options) + func (df *DataFrame) Table(opts ...TableOptions) string + func (df *DataFrame) Unlock(deepUnlock ...bool) + func (df *DataFrame) Update(row int, col interface{}, val interface{}, opts ...Options) + func (df *DataFrame) UpdateRow(row int, opts *Options, vals ...interface{}) + func (df *DataFrame) ValuesIterator(opts ...ValuesOptions) func(opts ...SeriesReturnOpt) (*int, map[interface{}]interface{}, int) + type ErrorCollection struct + func NewErrorCollection() *ErrorCollection + func (ec *ErrorCollection) AddError(err error, lock ...bool) + func (ec *ErrorCollection) As(target interface{}) bool + func (ec *ErrorCollection) Error() string + func (ec *ErrorCollection) Is(err error) bool + func (ec *ErrorCollection) IsNil(lock ...bool) bool + type FillRandOptions struct + Extra interface{} + R *Range + type FillRander interface + FillRand func(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + type FilterAction int + const CHOOSE + const DROP + const KEEP + type FilterDataFrameFn func(vals map[interface{}]interface{}, row, nRows int) (FilterAction, error) + type FilterOptions struct + DontLock bool + InPlace bool + type FilterSeriesFn func(val interface{}, row, nRows int) (FilterAction, error) + type IsEqualFunc func(a, b interface{}) bool + type IsEqualOptions struct + CheckName bool + DontLock bool + type IsLessThanFunc func(a, b interface{}) bool + type NewSerieser interface + NewSeries func(name string, init *SeriesInit) Series + type NilCountOptions struct + Ctx context.Context + DontLock bool + R *Range + StopAtOneNil bool + type Options struct + DontLock bool + type OrderedMapIntFloat64 struct + func NewOrderedMapIntFloat64(notOrdered ...bool) *OrderedMapIntFloat64 + func (o *OrderedMapIntFloat64) Delete(key int) + func (o *OrderedMapIntFloat64) Get(key int) (float64, bool) + func (o *OrderedMapIntFloat64) Set(key int, val float64) + func (o *OrderedMapIntFloat64) ValuesIterator() func() (*int, float64) + type OrderedMapIntMixed struct + func NewOrderedMapIntMixed(notOrdered ...bool) *OrderedMapIntMixed + func (o *OrderedMapIntMixed) Delete(key int) + func (o *OrderedMapIntMixed) Get(key int) (interface{}, bool) + func (o *OrderedMapIntMixed) Set(key int, val interface{}) + func (o *OrderedMapIntMixed) ValuesIterator() func() (*int, interface{}) + type Rander interface + Rand func() float64 + type Range struct + End *int + Start *int + func IntsToRanges(ints []int) []Range + func RangeFinite(start int, end ...int) Range + func (r *Range) Limits(length int) (s int, e int, _ error) + func (r *Range) NRows(length ...int) (int, error) + func (r Range) String() string + type RowError struct + Err error + Row int + func (re *RowError) Error() string + func (re *RowError) Unwrap() error + type Series interface + Append func(val interface{}, opts ...Options) int + ContainsNil func(opts ...Options) bool + Copy func(r ...Range) Series + Insert func(row int, val interface{}, opts ...Options) + IsEqual func(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + IsEqualFunc func(a, b interface{}) bool + IsLessThanFunc func(a, b interface{}) bool + Lock func() + NRows func(opts ...Options) int + Name func(opts ...Options) string + NilCount func(opts ...NilCountOptions) (int, error) + Prepend func(val interface{}, opts ...Options) + Remove func(row int, opts ...Options) + Rename func(n string, opts ...Options) + Reset func(opts ...Options) + SetValueToStringFormatter func(f ValueToStringFormatter) + Sort func(ctx context.Context, opts ...SortOptions) (completed bool) + Swap func(row1, row2 int, opts ...Options) + Type func() string + Unlock func() + Update func(row int, val interface{}, opts ...Options) + Value func(row int, opts ...Options) interface{} + ValueString func(row int, opts ...Options) string + ValuesIterator func(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesFloat64 struct + Values []float64 + func NewSeriesFloat64(name string, init *SeriesInit, vals ...interface{}) *SeriesFloat64 + func (s *SeriesFloat64) Append(val interface{}, opts ...Options) int + func (s *SeriesFloat64) AsciiGraph(opts ...AsciiGraphOptions) string + func (s *SeriesFloat64) ContainsNil(opts ...Options) bool + func (s *SeriesFloat64) Copy(r ...Range) Series + func (s *SeriesFloat64) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (s *SeriesFloat64) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesFloat64) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesFloat64) IsEqualFunc(a, b interface{}) bool + func (s *SeriesFloat64) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesFloat64) Lock() + func (s *SeriesFloat64) Mean(ctx context.Context) (float64, error) + func (s *SeriesFloat64) NRows(opts ...Options) int + func (s *SeriesFloat64) Name(opts ...Options) string + func (s *SeriesFloat64) NewSeries(name string, init *SeriesInit) Series + func (s *SeriesFloat64) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesFloat64) Prepend(val interface{}, opts ...Options) + func (s *SeriesFloat64) Remove(row int, opts ...Options) + func (s *SeriesFloat64) Rename(n string, opts ...Options) + func (s *SeriesFloat64) Reset(opts ...Options) + func (s *SeriesFloat64) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesFloat64) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesFloat64) String() string + func (s *SeriesFloat64) Sum(ctx context.Context) (float64, error) + func (s *SeriesFloat64) Swap(row1, row2 int, opts ...Options) + func (s *SeriesFloat64) Table(opts ...TableOptions) string + func (s *SeriesFloat64) ToSeriesFloat64(ctx context.Context, removeNil bool, ...) (*SeriesFloat64, error) + func (s *SeriesFloat64) ToSeriesMixed(ctx context.Context, removeNil bool, ...) (*SeriesMixed, error) + func (s *SeriesFloat64) ToSeriesString(ctx context.Context, removeNil bool, ...) (*SeriesString, error) + func (s *SeriesFloat64) Type() string + func (s *SeriesFloat64) Unlock() + func (s *SeriesFloat64) Update(row int, val interface{}, opts ...Options) + func (s *SeriesFloat64) Value(row int, opts ...Options) interface{} + func (s *SeriesFloat64) ValueString(row int, opts ...Options) string + func (s *SeriesFloat64) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesGeneric struct + func NewSeriesGeneric(name string, concreteType interface{}, init *SeriesInit, vals ...interface{}) *SeriesGeneric + func (s *SeriesGeneric) Append(val interface{}, opts ...Options) int + func (s *SeriesGeneric) ContainsNil(opts ...Options) bool + func (s *SeriesGeneric) Copy(r ...Range) Series + func (s *SeriesGeneric) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesGeneric) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesGeneric) IsEqualFunc(a, b interface{}) bool + func (s *SeriesGeneric) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesGeneric) Lock() + func (s *SeriesGeneric) NRows(opts ...Options) int + func (s *SeriesGeneric) Name(opts ...Options) string + func (s *SeriesGeneric) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesGeneric) Prepend(val interface{}, opts ...Options) + func (s *SeriesGeneric) Remove(row int, opts ...Options) + func (s *SeriesGeneric) Rename(n string, opts ...Options) + func (s *SeriesGeneric) Reset(opts ...Options) + func (s *SeriesGeneric) SetIsEqualFunc(f IsEqualFunc) + func (s *SeriesGeneric) SetIsLessThanFunc(f IsLessThanFunc) + func (s *SeriesGeneric) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesGeneric) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesGeneric) String() string + func (s *SeriesGeneric) Swap(row1, row2 int, opts ...Options) + func (s *SeriesGeneric) Table(opts ...TableOptions) string + func (s *SeriesGeneric) ToSeriesMixed(ctx context.Context, removeNil bool, ...) (*SeriesMixed, error) + func (s *SeriesGeneric) Type() string + func (s *SeriesGeneric) Unlock() + func (s *SeriesGeneric) Update(row int, val interface{}, opts ...Options) + func (s *SeriesGeneric) Value(row int, opts ...Options) interface{} + func (s *SeriesGeneric) ValueString(row int, opts ...Options) string + func (s *SeriesGeneric) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesInit struct + Capacity int + Size int + type SeriesInt64 struct + func NewSeriesInt64(name string, init *SeriesInit, vals ...interface{}) *SeriesInt64 + func (s *SeriesInt64) Append(val interface{}, opts ...Options) int + func (s *SeriesInt64) ContainsNil(opts ...Options) bool + func (s *SeriesInt64) Copy(r ...Range) Series + func (s *SeriesInt64) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (s *SeriesInt64) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesInt64) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesInt64) IsEqualFunc(a, b interface{}) bool + func (s *SeriesInt64) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesInt64) Lock() + func (s *SeriesInt64) Mean(ctx context.Context) (float64, error) + func (s *SeriesInt64) NRows(opts ...Options) int + func (s *SeriesInt64) Name(opts ...Options) string + func (s *SeriesInt64) NewSeries(name string, init *SeriesInit) Series + func (s *SeriesInt64) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesInt64) Prepend(val interface{}, opts ...Options) + func (s *SeriesInt64) Remove(row int, opts ...Options) + func (s *SeriesInt64) Rename(n string, opts ...Options) + func (s *SeriesInt64) Reset(opts ...Options) + func (s *SeriesInt64) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesInt64) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesInt64) String() string + func (s *SeriesInt64) Sum(ctx context.Context) (float64, error) + func (s *SeriesInt64) Swap(row1, row2 int, opts ...Options) + func (s *SeriesInt64) Table(opts ...TableOptions) string + func (s *SeriesInt64) ToSeriesFloat64(ctx context.Context, removeNil bool, ...) (*SeriesFloat64, error) + func (s *SeriesInt64) ToSeriesMixed(ctx context.Context, removeNil bool, ...) (*SeriesMixed, error) + func (s *SeriesInt64) ToSeriesString(ctx context.Context, removeNil bool, ...) (*SeriesString, error) + func (s *SeriesInt64) Type() string + func (s *SeriesInt64) Unlock() + func (s *SeriesInt64) Update(row int, val interface{}, opts ...Options) + func (s *SeriesInt64) Value(row int, opts ...Options) interface{} + func (s *SeriesInt64) ValueString(row int, opts ...Options) string + func (s *SeriesInt64) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesMixed struct + func NewSeriesMixed(name string, init *SeriesInit, vals ...interface{}) *SeriesMixed + func (s *SeriesMixed) Append(val interface{}, opts ...Options) int + func (s *SeriesMixed) ContainsNil(opts ...Options) bool + func (s *SeriesMixed) Copy(r ...Range) Series + func (s *SeriesMixed) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (s *SeriesMixed) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesMixed) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesMixed) IsEqualFunc(a, b interface{}) bool + func (s *SeriesMixed) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesMixed) Lock() + func (s *SeriesMixed) NRows(opts ...Options) int + func (s *SeriesMixed) Name(opts ...Options) string + func (s *SeriesMixed) NewSeries(name string, init *SeriesInit) Series + func (s *SeriesMixed) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesMixed) Prepend(val interface{}, opts ...Options) + func (s *SeriesMixed) Remove(row int, opts ...Options) + func (s *SeriesMixed) Rename(n string, opts ...Options) + func (s *SeriesMixed) Reset(opts ...Options) + func (s *SeriesMixed) SetIsEqualFunc(f IsEqualFunc) + func (s *SeriesMixed) SetIsLessThanFunc(f IsLessThanFunc) + func (s *SeriesMixed) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesMixed) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesMixed) String() string + func (s *SeriesMixed) Swap(row1, row2 int, opts ...Options) + func (s *SeriesMixed) Table(opts ...TableOptions) string + func (s *SeriesMixed) ToSeriesString(ctx context.Context, removeNil bool, ...) (*SeriesString, error) + func (s *SeriesMixed) Type() string + func (s *SeriesMixed) Unlock() + func (s *SeriesMixed) Update(row int, val interface{}, opts ...Options) + func (s *SeriesMixed) Value(row int, opts ...Options) interface{} + func (s *SeriesMixed) ValueString(row int, opts ...Options) string + func (s *SeriesMixed) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesReturnOpt uint8 + const SeriesIdx + const SeriesName + type SeriesString struct + func NewSeriesString(name string, init *SeriesInit, vals ...interface{}) *SeriesString + func (s *SeriesString) Append(val interface{}, opts ...Options) int + func (s *SeriesString) ContainsNil(opts ...Options) bool + func (s *SeriesString) Copy(r ...Range) Series + func (s *SeriesString) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (s *SeriesString) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesString) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesString) IsEqualFunc(a, b interface{}) bool + func (s *SeriesString) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesString) Lock() + func (s *SeriesString) NRows(opts ...Options) int + func (s *SeriesString) Name(opts ...Options) string + func (s *SeriesString) NewSeries(name string, init *SeriesInit) Series + func (s *SeriesString) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesString) Prepend(val interface{}, opts ...Options) + func (s *SeriesString) Remove(row int, opts ...Options) + func (s *SeriesString) Rename(n string, opts ...Options) + func (s *SeriesString) Reset(opts ...Options) + func (s *SeriesString) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesString) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesString) String() string + func (s *SeriesString) Swap(row1, row2 int, opts ...Options) + func (s *SeriesString) Table(opts ...TableOptions) string + func (s *SeriesString) ToSeriesFloat64(ctx context.Context, removeNil bool, ...) (*SeriesFloat64, error) + func (s *SeriesString) ToSeriesInt64(ctx context.Context, removeNil bool, conv ...func(interface{}) (*int64, error)) (*SeriesInt64, error) + func (s *SeriesString) ToSeriesMixed(ctx context.Context, removeNil bool, ...) (*SeriesMixed, error) + func (s *SeriesString) Type() string + func (s *SeriesString) Unlock() + func (s *SeriesString) Update(row int, val interface{}, opts ...Options) + func (s *SeriesString) Value(row int, opts ...Options) interface{} + func (s *SeriesString) ValueString(row int, opts ...Options) string + func (s *SeriesString) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SeriesTime struct + Layout string + Values []*time.Time + func NewSeriesTime(name string, init *SeriesInit, vals ...interface{}) *SeriesTime + func (s *SeriesTime) Append(val interface{}, opts ...Options) int + func (s *SeriesTime) ContainsNil(opts ...Options) bool + func (s *SeriesTime) Copy(r ...Range) Series + func (s *SeriesTime) FillRand(src rand.Source, probNil float64, rander Rander, opts ...FillRandOptions) + func (s *SeriesTime) Insert(row int, val interface{}, opts ...Options) + func (s *SeriesTime) IsEqual(ctx context.Context, s2 Series, opts ...IsEqualOptions) (bool, error) + func (s *SeriesTime) IsEqualFunc(a, b interface{}) bool + func (s *SeriesTime) IsLessThanFunc(a, b interface{}) bool + func (s *SeriesTime) Lock() + func (s *SeriesTime) NRows(opts ...Options) int + func (s *SeriesTime) Name(opts ...Options) string + func (s *SeriesTime) NewSeries(name string, init *SeriesInit) Series + func (s *SeriesTime) NilCount(opts ...NilCountOptions) (int, error) + func (s *SeriesTime) Prepend(val interface{}, opts ...Options) + func (s *SeriesTime) Remove(row int, opts ...Options) + func (s *SeriesTime) Rename(n string, opts ...Options) + func (s *SeriesTime) Reset(opts ...Options) + func (s *SeriesTime) SetValueToStringFormatter(f ValueToStringFormatter) + func (s *SeriesTime) Sort(ctx context.Context, opts ...SortOptions) (completed bool) + func (s *SeriesTime) String() string + func (s *SeriesTime) Swap(row1, row2 int, opts ...Options) + func (s *SeriesTime) Table(opts ...TableOptions) string + func (s *SeriesTime) ToSeriesFloat64(ctx context.Context, removeNil bool, ...) (*SeriesFloat64, error) + func (s *SeriesTime) ToSeriesInt64(ctx context.Context, removeNil bool, conv ...func(interface{}) (*int64, error)) (*SeriesInt64, error) + func (s *SeriesTime) ToSeriesMixed(ctx context.Context, removeNil bool, ...) (*SeriesMixed, error) + func (s *SeriesTime) Type() string + func (s *SeriesTime) Unlock() + func (s *SeriesTime) Update(row int, val interface{}, opts ...Options) + func (s *SeriesTime) Value(row int, opts ...Options) interface{} + func (s *SeriesTime) ValueString(row int, opts ...Options) string + func (s *SeriesTime) ValuesIterator(opts ...ValuesOptions) func() (*int, interface{}, int) + type SortKey struct + Desc bool + Key interface{} + type SortOptions struct + Desc bool + DontLock bool + Stable bool + type TableOptions struct + DontLock bool + R *Range + Series []interface{} + type ToSeriesFloat64 interface + ToSeriesFloat64 func(context.Context, bool, ...func(interface{}) (float64, error)) (*SeriesFloat64, error) + type ToSeriesInt64 interface + ToSeriesInt64 func(context.Context, bool, ...func(interface{}) (*int64, error)) (*SeriesInt64, error) + type ToSeriesMixed interface + ToSeriesMixed func(context.Context, bool, ...func(interface{}) (interface{}, error)) (*SeriesMixed, error) + type ToSeriesString interface + ToSeriesString func(context.Context, bool, ...func(interface{}) (*string, error)) (*SeriesString, error) + type ValueToStringFormatter func(val interface{}) string + type ValuesOptions struct + DontReadLock bool + InitialRow int + Step int