Documentation ¶
Index ¶
- Constants
- Variables
- type Interfacer
- type Iterator
- type NullBool
- type NullFloat32
- type NullFloat64
- type NullInt
- type NullInt32
- type NullInt64
- type NullString
- type NullTime
- type RawValue
- type Serie
- func AsFloat64(s Serie, missing *float64) Serie
- func Bool(v ...interface{}) Serie
- func BoolN(v ...interface{}) Serie
- func Float32(v ...interface{}) Serie
- func Float32N(v ...interface{}) Serie
- func Float64(v ...interface{}) Serie
- func Float64N(v ...interface{}) Serie
- func Int(v ...interface{}) Serie
- func Int32(v ...interface{}) Serie
- func Int32N(v ...interface{}) Serie
- func Int64(v ...interface{}) Serie
- func Int64N(v ...interface{}) Serie
- func IntN(v ...interface{}) Serie
- func New(typ interface{}, converter interface{}, comparer interface{}) Serie
- func Raw(v ...interface{}) Serie
- func String(v ...interface{}) Serie
- func StringN(v ...interface{}) Serie
- func Time(format ...string) Serie
- func TimeN(format ...string) Serie
- type StatOption
- type StatOptions
Constants ¶
View Source
const ( Lt = -1 Eq = 0 Gt = 1 )
Variables ¶
View Source
var ( ErrOutOfRange = errors.New("out of range") ErrCantFlattenSliceWithSet = errors.New("can't flatten slice with set") ErrGrowSizeMustBeStriclyPositive = errors.New("grow: size must be > 0") ErrShrinkSizeMustBeStriclyPositive = errors.New("shrink: size must be > 0") ErrShrinkSizeMustBeLesserThanLen = errors.New("shrink: size must be < len") ErrConcatTypeMismatch = errors.New("concat: type mismatch") )
Errors in mutate.go
Functions ¶
This section is empty.
Types ¶
type Interfacer ¶
type Interfacer interface {
Interface() interface{}
}
Interfacer to convert a value of serie to interface{} Used with serie.Get(at) serie.All()
type Iterator ¶
type Iterator interface { Next() bool Current() interface{} Reset() }
Iterator defines an iterator https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerator.reset?view=netcore-3.1
type NullFloat32 ¶
func (NullFloat32) Interface ¶
func (f NullFloat32) Interface() interface{}
type NullFloat64 ¶
func (NullFloat64) Interface ¶
func (f NullFloat64) Interface() interface{}
type NullString ¶
func (NullString) Interface ¶
func (s NullString) Interface() interface{}
type Serie ¶
type Serie interface { Type() reflect.Type Slice() interface{} // Underlying slice Get(at int) interface{} // T[i]. If T is an interfacer, returns Interfaced value All() []interface{} // Iterate Iterator() Iterator // Mutate Append(v ...interface{}) Prepend(v ...interface{}) error Insert(at int, v ...interface{}) error Set(at int, v interface{}) error Delete(at int) error Grow(size int) error Shrink(size int) error Concat(serie ...Serie) error Clear() // Select Head(size int) Serie Tail(size int) Serie Subset(at, size int) Serie Distinct() Serie Pick(at ...int) Serie Where(predicate func(interface{}) bool) Serie NonNils() Serie // Copy EmptyCopy() Serie Copy() Serie // Sort sort.Interface Compare(i, j int) int SortAsc() SortDesc() // Statistics Avg(opt ...StatOption) float64 Count(opt ...StatOption) int64 CountDistinct(opt ...StatOption) int64 Cusum(opt ...StatOption) []float64 Max(opt ...StatOption) float64 Min(opt ...StatOption) float64 Median(opt ...StatOption) float64 Stddev(opt ...StatOption) float64 Sum(opt ...StatOption) float64 Variance(opt ...StatOption) float64 }
type StatOption ¶
type StatOption func(opts *StatOptions)
func Missing ¶
func Missing(f float64) StatOption
Missing to treats all missing values (ie no-nils) as a value
type StatOptions ¶
type StatOptions struct {
Missing *float64 // replaces missing values with a value
}
Click to show internal directories.
Click to hide internal directories.