Package tech.tablesaw.analytic
Interface AnalyticQuerySteps.NumberingFunctions
- All Known Subinterfaces:
AnalyticQuerySteps.AddNumberingFunction
,AnalyticQuerySteps.AddNumberingFunctionWithExecute
- Enclosing interface:
- AnalyticQuerySteps
public static interface AnalyticQuerySteps.NumberingFunctions
Numbering functions assign integer values to each row based on their position within the
specified partition. Numbering functions require OrderBy.
Tablesaw only supports a subset of the numbering functions you might find in a SQL database. If you would like to see a new numbering function implemented please file an issue on GitHub.
-
Method Summary
Modifier and TypeMethodDescriptionCalculates the ordinal (1-based) rank of each row within the window partition.rank()
Calculates the ordinal (1-based) rank of each row within the ordered partition.Calculates the sequential row ordinal (1-based) of each row for each ordered partition.
-
Method Details
-
rowNumber
AnalyticQuerySteps.NameStepNumbering rowNumber()Calculates the sequential row ordinal (1-based) of each row for each ordered partition.- Returns:
- the name step in the fluent analytic query builder.
-
rank
Calculates the ordinal (1-based) rank of each row within the ordered partition. All peer rows receive the same rank value. The next row or set of peer rows receives a rank value which increments by the number of peers with the previous rank value, instead ofdenseRank()
, which always increments by 1.- Returns:
- the name step in the fluent analytic query builder.
-
denseRank
AnalyticQuerySteps.NameStepNumbering denseRank()Calculates the ordinal (1-based) rank of each row within the window partition. All peer rows receive the same rank value, and the subsequent rank value is incremented by one.- Returns:
- the name step in the fluent analytic query builder.
-