public class Summarizer extends Object
How to use:
1. Create an instance providing a source table, the column or columns to summarize, and a function or functions to apply 2. Applying the functions to the designated columns, possibly creating subgroup summaries using one of the by() methods
Constructor and Description |
---|
Summarizer(Table sourceTable,
Column<?> column,
AggregateFunction<?,?>... functions)
Returns an object capable of summarizing the given column in the given sourceTable, by applying
the given functions
|
Summarizer(Table sourceTable,
Column<?> column1,
Column<?> column2,
AggregateFunction<?,?>... functions)
Returns an object capable of summarizing the given columns in the given sourceTable, by
applying the given functions
|
Summarizer(Table sourceTable,
Column<?> column1,
Column<?> column2,
Column<?> column3,
AggregateFunction<?,?>... functions)
Returns an object capable of summarizing the given column2 in the given sourceTable, by
applying the given functions
|
Summarizer(Table sourceTable,
Column<?> column1,
Column<?> column2,
Column<?> column3,
Column<?> column4,
AggregateFunction<?,?>... functions)
Returns an object capable of summarizing the given columns in the given sourceTable, by
applying the given functions
|
Summarizer(Table sourceTable,
List<String> columnNames,
AggregateFunction<?,?>... functions)
Returns an object capable of summarizing the given column in the given sourceTable, by applying
the given functions
|
Modifier and Type | Method and Description |
---|---|
Table |
apply()
Returns the result of applying to the functions to all the values in the appropriate column
TODO add a test that uses a non numeric return type with apply
|
Table |
by(CategoricalColumn<?>... columns) |
Table |
by(int step)
Returns a summary of the records grouped into subsets of the same size, in the order they
appear
|
Table |
by(String... columnNames) |
Table |
by(String groupNameTemplate,
int step)
Deprecated.
Use by(step) instead.
|
Summarizer |
groupBy(CategoricalColumn<?>... columns) |
Summarizer |
groupBy(int step) |
Summarizer |
groupBy(String... columnNames) |
Table |
having(Function<Table,Selection> selection) |
public Summarizer(Table sourceTable, Column<?> column, AggregateFunction<?,?>... functions)
public Summarizer(Table sourceTable, List<String> columnNames, AggregateFunction<?,?>... functions)
public Summarizer(Table sourceTable, Column<?> column1, Column<?> column2, AggregateFunction<?,?>... functions)
public Summarizer(Table sourceTable, Column<?> column1, Column<?> column2, Column<?> column3, Column<?> column4, AggregateFunction<?,?>... functions)
public Summarizer(Table sourceTable, Column<?> column1, Column<?> column2, Column<?> column3, AggregateFunction<?,?>... functions)
public Table by(CategoricalColumn<?>... columns)
@Deprecated public Table by(String groupNameTemplate, int step)
All groups have the same number of records. If the final group has fewer than step records it is dropped.
groupNameTemplate
- a prefix for the group namestep
- the number or records to include in each grouppublic Table by(int step)
All groups have the same number of records. If the final group has fewer than step records it is dropped.
step
- the number or records to include in each grouppublic Table apply()
public Summarizer groupBy(CategoricalColumn<?>... columns)
public Summarizer groupBy(String... columnNames)
public Summarizer groupBy(int step)
Copyright © 2020. All rights reserved.