Documentation ¶
Overview ¶
TODO: the gval.Language stuff should go into a separate module.
Index ¶
- Variables
- func DefaultAverageCycleSpec() averageCycleSpec
- func DefaultExpressionSpec() expressionSpec
- func DefaultFilterSetSpec() filterSetSpec
- func DefaultResampleSpec() resampleSpec
- func DefaultSelectSpec() selectSpec
- func Process(df *dataframe.DataFrame, configs []Config) error
- func SliceArithmetic() gval.Language
- type Config
- type Processor
Constants ¶
This section is empty.
Variables ¶
var ( ErrAverageCycleNRowsPerTime = errors.New("average-cycle: bad number of rows per time") ErrAverageCycleTimeMismatch = errors.New("average-cycle: cycle time mismatch") )
var ( ErrBadFilterAggregation = fmt.Errorf( "bad aggregation mode, available modes are: %q", common.MapKeys(filterAggregations)) )
var ( ErrBadProcessor = fmt.Errorf( "bad processor type, available types are: %q", common.MapKeys(ProcessorTypes)) )
var (
ErrExpressionFieldSize = errors.New("expression: operand size mismatch")
)
var ProcessorTypes = map[string]Processor{
"average-cycle": averageCycleProcessor,
"dummy": dummyProcessor,
"expression": expressionProcessor,
"filter": filterProcessor,
"select": selectProcessor,
"resample": resampleProcessor,
}
ProcessorTypes maps Processor type tags to Processors.
Functions ¶
func DefaultAverageCycleSpec ¶
func DefaultAverageCycleSpec() averageCycleSpec
DefaultAverageCycleSpec returns a averageCycleSpec with 'sensible' default values.
func DefaultExpressionSpec ¶
func DefaultExpressionSpec() expressionSpec
DefaultExpressionSetSpec returns a expressionSetSpec with 'sensible' default values.
func DefaultFilterSetSpec ¶
func DefaultFilterSetSpec() filterSetSpec
DefaultFilterSetSpec returns a filterSetSpec with 'sensible' default values.
func DefaultResampleSpec ¶
func DefaultResampleSpec() resampleSpec
DefaultResampleSpec returns a selectSpec with 'sensible' default values.
func DefaultSelectSpec ¶
func DefaultSelectSpec() selectSpec
DefaultSelectSpec returns a selectSpec with 'sensible' default values.
func Process ¶
Process applies all Processors defined in the config to df. Each Processor is applied sequentially, in the order they appear in the config, and the result of one Processor is passed as the input to the next one.
An error is returned if any of the Processors return an error. If an error is returned, the dataframe.DataFrame state is unknown.